Top Description Fields Constructors Methods
org.springframework.expression.spel.ast

public Class Selection

extends SpelNodeImpl
Class Inheritance
Imports
java.lang.reflect.Array, java.util.ArrayList, .Arrays, .HashMap, .List, .Map, org.springframework.core.convert.TypeDescriptor, org.springframework.expression.EvaluationException, .TypedValue, org.springframework.expression.spel.ExpressionState, .SpelEvaluationException, .SpelMessage, org.springframework.util.Assert, .ClassUtils, .CollectionUtils, .ObjectUtils

Represents selection over a map or collection.

For example, {1,2,3,4,5,6,7,8,9,10}.?{#isEven(#this)} evaluates to [2, 4, 6, 8, 10].

Basically a subset of the input data is returned based on the evaluation of the expression supplied as selection criteria.

Authors
Andy Clement, Mark Fisher, Sam Brannen, Juergen Hoeller
Since
3.0

Field Summary

Modifier and TypeField and Description
public static final int
ALL

All items (?[]).

public static final int
FIRST

The first item (^[]).

public static final int
LAST

The last item ($[]).

private final boolean
private final int
Inherited from org.springframework.expression.spel.ast.SpelNodeImpl:
childrenexitTypeDescriptor

Constructor Summary

AccessConstructor and Description
public
Selection(boolean nullSafe, int variant, int startPos, int endPos, SpelNodeImpl expression)

Method Summary

Modifier and TypeMethod and Description
public TypedValue
protected ValueRef
private String
public String
toStringAST()

Implements org.springframework.expression.spel.SpelNode.toStringAST.

Return the string form of this AST node.
Inherited from org.springframework.expression.spel.ast.SpelNodeImpl:
generateCodegenerateCodeForArgumentgenerateCodeForArgumentsgetChildgetChildCountgetEndPositiongetExitDescriptorgetObjectClassgetStartPositiongetTypedValuegetValuegetValueisCompilableisWritablenextChildIssetValuesetValueInternal

Field Detail

ALLback to summary
public static final int ALL

All items (?[]).

FIRSTback to summary
public static final int FIRST

The first item (^[]).

LASTback to summary
public static final int LAST

The last item ($[]).

nullSafeback to summary
private final boolean nullSafe
variantback to summary
private final int variant

Constructor Detail

Selectionback to summary
public Selection(boolean nullSafe, int variant, int startPos, int endPos, SpelNodeImpl expression)

Method Detail

getValueInternalback to summary
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException

Implements abstract org.springframework.expression.spel.ast.SpelNodeImpl.getValueInternal.

Annotations
@Override
getValueRefback to summary
protected ValueRef getValueRef(ExpressionState state) throws EvaluationException

Overrides org.springframework.expression.spel.ast.SpelNodeImpl.getValueRef.

Annotations
@Override
prefixback to summary
private String prefix()
toStringASTback to summary
public String toStringAST()

Implements org.springframework.expression.spel.SpelNode.toStringAST.

Doc from org.springframework.expression.spel.SpelNode.toStringAST.

Return the string form of this AST node.

Returns:String

the string form

Annotations
@Override