org.springframework.expression.spel.ast
Class Selection

java.lang.Object
  extended by org.antlr.runtime.tree.BaseTree
      extended by org.antlr.runtime.tree.CommonTree
          extended by org.springframework.expression.spel.ast.SpelNodeImpl
              extended by org.springframework.expression.spel.ast.Selection
All Implemented Interfaces:
java.io.Serializable, org.antlr.runtime.tree.Tree, CommonTypeDescriptors, SpelNode

public class Selection
extends SpelNodeImpl

Represents selection over a map or collection. For example: {1,2,3,4,5,6,7,8,9,10}.?{#isEven(#this) == 'y'} returns [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.

Author:
Andy Clement
See Also:
Serialized Form

Field Summary
static int ALL
           
static int FIRST
           
static int LAST
           
 
Fields inherited from class org.antlr.runtime.tree.CommonTree
startIndex, stopIndex, token
 
Fields inherited from class org.antlr.runtime.tree.BaseTree
children
 
Fields inherited from interface org.springframework.expression.spel.ast.CommonTypeDescriptors
BOOLEAN_TYPE_DESCRIPTOR, BYTE_TYPE_DESCRIPTOR, CHARACTER_TYPE_DESCRIPTOR, CLASS_TYPE_DESCRIPTOR, DOUBLE_TYPE_DESCRIPTOR, FLOAT_TYPE_DESCRIPTOR, INTEGER_TYPE_DESCRIPTOR, LONG_TYPE_DESCRIPTOR, OBJECT_TYPE_DESCRIPTOR, SHORT_TYPE_DESCRIPTOR, STRING_TYPE_DESCRIPTOR
 
Fields inherited from interface org.antlr.runtime.tree.Tree
INVALID_NODE
 
Constructor Summary
Selection(org.antlr.runtime.Token payload, int variant)
           
 
Method Summary
 TypedValue getValueInternal(ExpressionState state)
           
 java.lang.String toStringAST()
           
 
Methods inherited from class org.springframework.expression.spel.ast.SpelNodeImpl
getChild, getObjectClass, getStartPosition, getTokenName, getValue, getValue, isWritable, setValue
 
Methods inherited from class org.antlr.runtime.tree.CommonTree
dupNode, getCharPositionInLine, getLine, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setTokenStartIndex, setTokenStopIndex, toString
 
Methods inherited from class org.antlr.runtime.tree.BaseTree
addChild, addChildren, createChildrenList, deleteChild, dupTree, getChildCount, getFirstChildWithType, setChild, toStringTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.expression.spel.SpelNode
getChildCount
 

Field Detail

ALL

public static final int ALL
See Also:
Constant Field Values

FIRST

public static final int FIRST
See Also:
Constant Field Values

LAST

public static final int LAST
See Also:
Constant Field Values
Constructor Detail

Selection

public Selection(org.antlr.runtime.Token payload,
                 int variant)
Method Detail

getValueInternal

public TypedValue getValueInternal(ExpressionState state)
                            throws EvaluationException
Specified by:
getValueInternal in class SpelNodeImpl
Throws:
EvaluationException

toStringAST

public java.lang.String toStringAST()
Specified by:
toStringAST in interface SpelNode
Specified by:
toStringAST in class SpelNodeImpl
Returns:
the string form of this AST node