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

public Class InlineMap

extends SpelNodeImpl
Class Inheritance
Imports
java.util.Collections, .LinkedHashMap, .Map, org.springframework.expression.EvaluationException, .TypedValue, org.springframework.expression.spel.ExpressionState, .SpelNode, org.springframework.expression.spel.support.StandardEvaluationContext, org.springframework.lang.Nullable, org.springframework.util.Assert

Represent a map in an expression, e.g. '{name:'foo',age:12}'
Authors
Andy Clement, Sam Brannen, Harry Yang, Semyon Danilov
Since
4.1

Field Summary

Modifier and TypeField and Description
private final TypedValue
Inherited from org.springframework.expression.spel.ast.SpelNodeImpl:
childrenexitTypeDescriptor

Constructor Summary

AccessConstructor and Description
public
InlineMap(int startPos, int endPos, SpelNodeImpl... args)

Method Summary

Modifier and TypeMethod and Description
private TypedValue
computeConstantValue()

If all the components of the map are constants, or lists/maps that themselves contain constants, then a constant map can be built to represent this node.

public Map<Object, Object>
public TypedValue
public boolean
isConstant()

Return whether this map is a constant value.

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:
generateCodegenerateCodeForArgumentgenerateCodeForArgumentsgetChildgetChildCountgetEndPositiongetExitDescriptorgetObjectClassgetStartPositiongetTypedValuegetValuegetValuegetValueRefisCompilableisWritablenextChildIssetValuesetValueInternal

Field Detail

constantback to summary
private final TypedValue constant
Annotations
@Nullable

Constructor Detail

InlineMapback to summary
public InlineMap(int startPos, int endPos, SpelNodeImpl... args)

Method Detail

computeConstantValueback to summary
private TypedValue computeConstantValue()

If all the components of the map are constants, or lists/maps that themselves contain constants, then a constant map can be built to represent this node.

This will speed up later getValue calls and reduce the amount of garbage created.

Annotations
@Nullable
getConstantValueback to summary
public Map<Object, Object> getConstantValue()
Annotations
@SuppressWarnings:unchecked
@Nullable
getValueInternalback to summary
public TypedValue getValueInternal(ExpressionState expressionState) throws EvaluationException

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

Annotations
@Override
isConstantback to summary
public boolean isConstant()

Return whether this map is a constant value.

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