|
spring-expression | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.expression.spel.support.ReflectiveMethodResolver
public class ReflectiveMethodResolver
Reflection-based MethodResolver
used by default in
StandardEvaluationContext
unless explicit method resolvers have been specified.
StandardEvaluationContext.addMethodResolver(MethodResolver)
Constructor Summary | |
---|---|
ReflectiveMethodResolver()
|
|
ReflectiveMethodResolver(boolean useDistance)
This constructors allows the ReflectiveMethodResolver to be configured such that it will use a distance computation to check which is the better of two close matches (when there are multiple matches). |
Method Summary | |
---|---|
protected java.lang.reflect.Method[] |
getMethods(java.lang.Class<?> type)
Return the set of methods for this type. |
void |
registerMethodFilter(java.lang.Class<?> type,
MethodFilter filter)
|
MethodExecutor |
resolve(EvaluationContext context,
java.lang.Object targetObject,
java.lang.String name,
java.util.List<org.springframework.core.convert.TypeDescriptor> argumentTypes)
Locate a method on a type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectiveMethodResolver()
public ReflectiveMethodResolver(boolean useDistance)
useDistance
- true if distance computation should be used when calculating matchesMethod Detail |
---|
public MethodExecutor resolve(EvaluationContext context, java.lang.Object targetObject, java.lang.String name, java.util.List<org.springframework.core.convert.TypeDescriptor> argumentTypes) throws AccessException
resolve
in interface MethodResolver
context
- the current evaluation contexttargetObject
- the object upon which the method is being calledargumentTypes
- the arguments that the constructor must be able to handle
AccessException
public void registerMethodFilter(java.lang.Class<?> type, MethodFilter filter)
protected java.lang.reflect.Method[] getMethods(java.lang.Class<?> type)
type
, but subclasses may override
in order to alter the results, e.g. specifying static methods declared elsewhere.
type
- the class for which to return the methods
|
spring-expression | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |