org.springframework.expression.spel.ast
Class MethodReference

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

public class MethodReference
extends SpelNodeImpl

Since:
3.0
Author:
Andy Clement, Juergen Hoeller

Field Summary
private  MethodExecutor cachedExecutor
           
private  java.lang.String name
           
private  boolean nullSafe
           
 
Fields inherited from class org.springframework.expression.spel.ast.SpelNodeImpl
children, pos
 
Constructor Summary
MethodReference(boolean nullSafe, java.lang.String methodName, int pos, SpelNodeImpl... arguments)
           
 
Method Summary
private  MethodExecutor findAccessorForMethod(java.lang.String name, java.util.List<TypeDescriptor> argumentTypes, ExpressionState state)
           
private  java.util.List<TypeDescriptor> getTypes(java.lang.Object... arguments)
           
 TypedValue getValueInternal(ExpressionState state)
           
private  void throwSimpleExceptionIfPossible(ExpressionState state, AccessException ae)
          Decode the AccessException, throwing a lightweight evaluation exception or, if the cause was a RuntimeException, throw the RuntimeException directly.
 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

name

private final java.lang.String name

nullSafe

private final boolean nullSafe

cachedExecutor

private volatile MethodExecutor cachedExecutor
Constructor Detail

MethodReference

public MethodReference(boolean nullSafe,
                       java.lang.String methodName,
                       int pos,
                       SpelNodeImpl... arguments)
Method Detail

getValueInternal

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

throwSimpleExceptionIfPossible

private void throwSimpleExceptionIfPossible(ExpressionState state,
                                            AccessException ae)
Decode the AccessException, throwing a lightweight evaluation exception or, if the cause was a RuntimeException, throw the RuntimeException directly.


getTypes

private java.util.List<TypeDescriptor> getTypes(java.lang.Object... arguments)

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

findAccessorForMethod

private MethodExecutor findAccessorForMethod(java.lang.String name,
                                             java.util.List<TypeDescriptor> argumentTypes,
                                             ExpressionState state)
                                      throws SpelEvaluationException
Throws:
SpelEvaluationException