org.springframework.expression.spel.ast
Class InlineList

java.lang.Object
  extended by org.springframework.expression.spel.ast.SpelNodeImpl
      extended by org.springframework.expression.spel.ast.InlineList
All Implemented Interfaces:
SpelNode

public class InlineList
extends SpelNodeImpl

Represent a list in an expression, e.g. '{1,2,3}'

Since:
3.0.4
Author:
Andy Clement

Field Summary
(package private)  TypedValue constant
           
 
Fields inherited from class org.springframework.expression.spel.ast.SpelNodeImpl
children, pos
 
Constructor Summary
InlineList(int pos, SpelNodeImpl... args)
           
 
Method Summary
private  void checkIfConstant()
          If all the components of the list are constants, or lists that themselves contain constants, then a constant list can be built to represent this node.
private  java.util.List<java.lang.Object> getConstantValue()
           
 TypedValue getValueInternal(ExpressionState expressionState)
           
 boolean isConstant()
           
 java.lang.String toStringAST()
           
 
Methods inherited from class org.springframework.expression.spel.ast.SpelNodeImpl
getChild, getChildCount, getEndPosition, getObjectClass, getPreviousChild, getStartPosition, getTypedValue, getValue, getValue, isWritable, nextChildIs, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constant

TypedValue constant
Constructor Detail

InlineList

public InlineList(int pos,
                  SpelNodeImpl... args)
Method Detail

checkIfConstant

private void checkIfConstant()
If all the components of the list are constants, or lists that themselves contain constants, then a constant list can be built to represent this node. This will speed up later getValue calls and reduce the amount of garbage created.


getValueInternal

public TypedValue getValueInternal(ExpressionState expressionState)
                            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

isConstant

public boolean isConstant()
Returns:
whether this list is a constant value

getConstantValue

private java.util.List<java.lang.Object> getConstantValue()