public class HashListMethodExecutor
extends java.lang.Object
implements org.springframework.expression.MethodExecutor
MethodExecutor
using an first argument as key
to be matched from second argument which is expected to be
a List of List of Objects.
Use case is to use spel expression "list(region,{{'nordic','fin','swe'},{'britain','eng','sco'}})" to partition value in 'region' so that resolved partition value is 'nordic' if any of a 'nordic','fin', or 'swe' is matched. Resolved value will be suffixed with '_list' and default value if there are no matches is 'list'.
Constructor and Description |
---|
HashListMethodExecutor() |
Modifier and Type | Method and Description |
---|---|
org.springframework.expression.TypedValue |
execute(org.springframework.expression.EvaluationContext context,
java.lang.Object target,
java.lang.Object... arguments) |
static java.lang.String |
list(java.lang.String arg1,
java.util.List<java.lang.Object> arg2) |
public org.springframework.expression.TypedValue execute(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.Object... arguments) throws org.springframework.expression.AccessException
execute
in interface org.springframework.expression.MethodExecutor
org.springframework.expression.AccessException
public static java.lang.String list(java.lang.String arg1, java.util.List<java.lang.Object> arg2)