| Modifier and Type | Field and Description |
|---|---|
| protected SpelNodeImpl[] | |
| private final int | |
| protected volatile String | exitTypeDescriptor
Indicates the type descriptor for the result of this expression node. |
| private static final SpelNodeImpl[] | |
| private SpelNodeImpl | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | generateCode(MethodVisitor
the ASM MethodVisitor into which code should be generated mv, CodeFlow a context object with info about what is on the stack cf)Generate the bytecode for this node into the supplied visitor. |
| protected static void | generateCodeForArgument(MethodVisitor mv, CodeFlow cf, SpelNodeImpl argument, String paramDesc)
Ask an argument to generate its bytecode and then follow it up with any boxing/unboxing/checkcasting to ensure it matches the expected parameter descriptor. |
| protected static void | generateCodeForArguments(MethodVisitor
the method visitor where code should be generated mv, CodeFlow the current codeflow cf, Member the method or constructor for which arguments are being setup member, SpelNodeImpl[] the expression nodes for the expression supplied argument values arguments)Generate code that handles building the argument values for the specified method. |
| public SpelNode | getChild(int index)
Implements org. |
| public int | getChildCount()
Implements org. |
| public int | getEndPosition()
Implements org. |
| public String | |
| public Class | getObjectClass(Object
the object that the caller wants the class of obj)Implements org. |
| public int | getStartPosition()
Implements org. |
| public final TypedValue | getTypedValue(ExpressionState
the current expression state (includes the context) expressionState)Implements org. |
| public final Object | getValue(ExpressionState
the current expression state (includes the context) expressionState)Implements org. |
| protected final <T> T | |
| public abstract TypedValue | |
| protected ValueRef | |
| public boolean | Returns: true if this node can be compiled to bytecodeCheck whether a node can be compiled to bytecode. |
| public boolean | isWritable(ExpressionState
the current expression state (includes the context) expressionState)Implements org. |
| protected boolean | |
| public void | setValue(ExpressionState
the current expression state (includes the context) expressionState, Object the new value newValue)Implements org. |
| public TypedValue | setValueInternal(ExpressionState
the current expression state (includes the context) expressionState, Supplier<TypedValue> a supplier of the new value valueSupplier)Evaluate the expression to a node and then set the new value created by the
specified |
| children | back to summary |
|---|---|
| protected SpelNodeImpl[] children | |
| endPos | back to summary |
|---|---|
| private final int endPos | |
| exitTypeDescriptor | back to summary |
|---|---|
| protected volatile String exitTypeDescriptor Indicates the type descriptor for the result of this expression node. This is set as soon as it is known. For a literal node it is known immediately. For a property access or method invocation it is known after one evaluation of that node. The descriptor is like the bytecode form but is slightly easier to work with. It does not include the trailing semicolon (for non array reference types). Some examples: Ljava/lang/String, I, [I | |
| NO_CHILDREN | back to summary |
|---|---|
| private static final SpelNodeImpl[] NO_CHILDREN | |
| parent | back to summary |
|---|---|
| private SpelNodeImpl parent
| |
| startPos | back to summary |
|---|---|
| private final int startPos | |
| SpelNodeImpl | back to summary |
|---|---|
| public SpelNodeImpl(int startPos, int endPos, SpelNodeImpl... operands) | |
| generateCode | back to summary |
|---|---|
| public void generateCode(MethodVisitor mv, CodeFlow cf) Generate the bytecode for this node into the supplied visitor. Context info about the current expression being compiled is available in the codeflow object, e.g. including information about the type of the object currently on the stack.
| |
| generateCodeForArgument | back to summary |
|---|---|
| protected static void generateCodeForArgument(MethodVisitor mv, CodeFlow cf, SpelNodeImpl argument, String paramDesc) Ask an argument to generate its bytecode and then follow it up with any boxing/unboxing/checkcasting to ensure it matches the expected parameter descriptor. | |
| generateCodeForArguments | back to summary |
|---|---|
| protected static void generateCodeForArguments(MethodVisitor mv, CodeFlow cf, Member member, SpelNodeImpl[] arguments) Generate code that handles building the argument values for the specified method. This method will take account of whether the invoked method is a varargs method and if it is then the argument values will be appropriately packaged into an array.
| |
| getChild | back to summary |
|---|---|
| public SpelNode getChild(int index) Implements org. Doc from org. Helper method that returns a SpelNode rather than an Antlr Tree node. | |
| getChildCount | back to summary |
|---|---|
| public int getChildCount() Implements org. Doc from org. Return the number of children under this node.
| |
| getEndPosition | back to summary |
|---|---|
| public int getEndPosition() Implements org. Doc from org. Return the end position of this AST node in the expression string.
| |
| getExitDescriptor | back to summary |
|---|---|
public String getExitDescriptor()
| |
| getObjectClass | back to summary |
|---|---|
| public Class Implements org. Doc from org. Determine the class of the object passed in, unless it is already a class object. | |
| getStartPosition | back to summary |
|---|---|
| public int getStartPosition() Implements org. Doc from org. Return the start position of this AST node in the expression string.
| |
| getTypedValue | back to summary |
|---|---|
| public final TypedValue getTypedValue(ExpressionState expressionState) throws EvaluationException Implements org. Doc from org. Evaluate the expression node in the context of the supplied expression state and return the typed value.
| |
| getValue | back to summary |
|---|---|
| public final Object getValue(ExpressionState expressionState) throws EvaluationException Implements org. Doc from org. Evaluate the expression node in the context of the supplied expression state and return the value.
| |
| getValue | back to summary |
|---|---|
protected final <T> T getValue(ExpressionState state, Class<T> desiredReturnType) throws EvaluationException
| |
| getValueInternal | back to summary |
|---|---|
| public abstract TypedValue getValueInternal(ExpressionState expressionState) throws EvaluationException | |
| getValueRef | back to summary |
|---|---|
| protected ValueRef getValueRef(ExpressionState state) throws EvaluationException | |
| isCompilable | back to summary |
|---|---|
| public boolean isCompilable() Check whether a node can be compiled to bytecode. The reasoning in each node may be different but will typically involve checking whether the exit type descriptor of the node is known and any relevant child nodes are compilable.
| |
| isWritable | back to summary |
|---|---|
| public boolean isWritable(ExpressionState expressionState) throws EvaluationException Implements org. Doc from org. Determine if this expression node will support a setValue() call.
| |
| nextChildIs | back to summary |
|---|---|
| protected boolean nextChildIs(Class<?>... classes) Return | |
| setValue | back to summary |
|---|---|
| public void setValue(ExpressionState expressionState, Object newValue) throws EvaluationException Implements org. Doc from org. Evaluate the expression to a node and then set the new value on that node. For example, if the expression evaluates to a property reference, then the property will be set to the new value.
| |
| setValueInternal | back to summary |
|---|---|
| public TypedValue setValueInternal(ExpressionState expressionState, Supplier<TypedValue> valueSupplier) throws EvaluationException Evaluate the expression to a node and then set the new value created by the
specified For example, if the expression evaluates to a property reference, then the property will be set to the new value. Favor this method over By default, this method throws a
| |