new example.Foo()new String('hello world')new int[] {1,2,3,4}new String[] {'abc','xyz'}new int[5]new int[3][4]| Modifier and Type | Field and Description |
|---|---|
| private volatile ConstructorExecutor | cachedExecutor
The cached executor that may be reused on subsequent evaluations. |
| private final SpelNodeImpl[] | |
| private final boolean | |
| private static final int | MAX_ARRAY_ELEMENTS
Maximum number of elements permitted in an array declaration, applying to one-dimensional as well as multi-dimensional arrays. |
| Access | Constructor and Description |
|---|---|
| public | ConstructorReference(int startPos, int endPos, SpelNodeImpl... arguments)
Create a constructor reference. |
| public | ConstructorReference(int startPos, int endPos, SpelNodeImpl[] dimensions, SpelNodeImpl... arguments)
Create a constructor reference. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private TypedValue | Returns: the new arraythe expression state within which this expression is being evaluated state)Create an array and return it. |
| private boolean[] | |
| private byte[] | |
| private char[] | |
| private double[] | |
| private float[] | |
| private int[] | |
| private long[] | |
| private TypedValue | Returns: the new objectthe expression state within which this expression is being evaluated state)Create a new ordinary object and return it. |
| private Object | createReferenceTypeArray(ExpressionState state, TypeConverter typeConverter, SpelNodeImpl[] children, Class<?> componentType)
|
| private short[] | |
| private ConstructorExecutor | Returns: a reusable ConstructorExecutor that can be invoked to run the constructor or nullthe type trying to be constructed typeName, List<TypeDescriptor> the types of the arguments supplied that the constructor must take argumentTypes, ExpressionState the current state of the expression state)Go through the list of registered constructor resolvers and see if any can find a constructor that takes the specified set of arguments. |
| 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)Overrides org. |
| public TypedValue | getValueInternal(ExpressionState state)
Implements abstract org. |
| private boolean | |
| public boolean | isCompilable()
Overrides org. |
| public String | toStringAST()
Implements org. |
| cachedExecutor | back to summary |
|---|---|
| private volatile ConstructorExecutor cachedExecutor The cached executor that may be reused on subsequent evaluations. | |
| dimensions | back to summary |
|---|---|
| private final SpelNodeImpl[] dimensions
| |
| isArrayConstructor | back to summary |
|---|---|
| private final boolean isArrayConstructor | |
| MAX_ARRAY_ELEMENTS | back to summary |
|---|---|
| private static final int MAX_ARRAY_ELEMENTS Maximum number of elements permitted in an array declaration, applying to one-dimensional as well as multi-dimensional arrays.
| |
| ConstructorReference | back to summary |
|---|---|
| public ConstructorReference(int startPos, int endPos, SpelNodeImpl... arguments) Create a constructor reference. The first argument is the type, the rest are the parameters to the constructor call | |
| ConstructorReference | back to summary |
|---|---|
| public ConstructorReference(int startPos, int endPos, SpelNodeImpl[] dimensions, SpelNodeImpl... arguments) Create a constructor reference. The first argument is the type, the rest are the parameters to the constructor call | |
| checkNumElements | back to summary |
|---|---|
| private void checkNumElements(long numElements) | |
| createArray | back to summary |
|---|---|
| private TypedValue createArray(ExpressionState state) throws EvaluationException Create an array and return it.
| |
| createBooleanArray | back to summary |
|---|---|
| private boolean[] createBooleanArray(ExpressionState state, TypeConverter typeConverter, SpelNodeImpl[] children) | |
| createByteArray | back to summary |
|---|---|
| private byte[] createByteArray(ExpressionState state, TypeConverter converter, SpelNodeImpl[] children) | |
| createCharArray | back to summary |
|---|---|
| private char[] createCharArray(ExpressionState state, TypeConverter typeConverter, SpelNodeImpl[] children) | |
| createDoubleArray | back to summary |
|---|---|
| private double[] createDoubleArray(ExpressionState state, TypeConverter typeConverter, SpelNodeImpl[] children) | |
| createFloatArray | back to summary |
|---|---|
| private float[] createFloatArray(ExpressionState state, TypeConverter typeConverter, SpelNodeImpl[] children) | |
| createIntArray | back to summary |
|---|---|
| private int[] createIntArray(ExpressionState state, TypeConverter typeConverter, SpelNodeImpl[] children) | |
| createLongArray | back to summary |
|---|---|
| private long[] createLongArray(ExpressionState state, TypeConverter converter, SpelNodeImpl[] children) | |
| createNewInstance | back to summary |
|---|---|
| private TypedValue createNewInstance(ExpressionState state) throws EvaluationException Create a new ordinary object and return it.
| |
| createReferenceTypeArray | back to summary |
|---|---|
| private Object createReferenceTypeArray(ExpressionState state, TypeConverter typeConverter, SpelNodeImpl[] children, Class<?> componentType) | |
| createShortArray | back to summary |
|---|---|
| private short[] createShortArray(ExpressionState state, TypeConverter typeConverter, SpelNodeImpl[] children) | |
| findExecutorForConstructor | back to summary |
|---|---|
| private ConstructorExecutor findExecutorForConstructor(String typeName, List<TypeDescriptor> argumentTypes, ExpressionState state) throws SpelEvaluationException Go through the list of registered constructor resolvers and see if any can find a constructor that takes the specified set of arguments.
| |
| generateCode | back to summary |
|---|---|
| public void generateCode(MethodVisitor mv, CodeFlow cf) Overrides org. Doc from org. 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.
| |
| getValueInternal | back to summary |
|---|---|
| public TypedValue getValueInternal(ExpressionState state) throws EvaluationException Implements abstract org. Implements getValue() - delegating to the code for building an array or a simple type.
| |
| hasInitializer | back to summary |
|---|---|
| private boolean hasInitializer() | |
| isCompilable | back to summary |
|---|---|
| public boolean isCompilable() Overrides org. Doc from org. 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.
| |
| toStringAST | back to summary |
|---|---|
| public String toStringAST() Implements org. Doc from org. Return the string form of this AST node. | |