|
Spring Framework | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.expression.spel.support.ReflectionHelper
public class ReflectionHelper
Utility methods used by the reflection resolver code to discover the appropriate methods/constructors and fields that should be used in expressions.
Nested Class Summary | |
---|---|
static class |
ReflectionHelper.ArgsMatchKind
|
static class |
ReflectionHelper.ArgumentsMatchInfo
An instance of ArgumentsMatchInfo describes what kind of match was achieved between two sets of arguments - the set that a method/constructor is expecting and the set that are being supplied at the point of invocation. |
Constructor Summary | |
---|---|
ReflectionHelper()
|
Method Summary | |
---|---|
static void |
convertAllArguments(TypeConverter converter,
java.lang.Object[] arguments,
java.lang.reflect.Method method)
Convert a supplied set of arguments into the requested types. |
static int |
getTypeDifferenceWeight(java.util.List<TypeDescriptor> paramTypes,
java.util.List<TypeDescriptor> argTypes)
Based on MethodInvoker.getTypeDifferenceWeight(Class[], Object[]) but operates on TypeDescriptors. |
static java.lang.Object[] |
setupArgumentsForVarargsInvocation(java.lang.Class[] requiredParameterTypes,
java.lang.Object... args)
Package up the arguments so that they correctly match what is expected in parameterTypes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectionHelper()
Method Detail |
---|
public static int getTypeDifferenceWeight(java.util.List<TypeDescriptor> paramTypes, java.util.List<TypeDescriptor> argTypes)
MethodInvoker.getTypeDifferenceWeight(Class[], Object[])
but operates on TypeDescriptors.
public static void convertAllArguments(TypeConverter converter, java.lang.Object[] arguments, java.lang.reflect.Method method) throws SpelEvaluationException
converter
- the converter to use for type conversionsarguments
- the arguments to convert to the requested parameter typesmethod
- the target Method
SpelEvaluationException
- if there is a problem with conversionpublic static java.lang.Object[] setupArgumentsForVarargsInvocation(java.lang.Class[] requiredParameterTypes, java.lang.Object... args)
requiredParameterTypes
- the types of the parameters for the invocationargs
- the arguments to be setup ready for the invocation
|
Spring Framework | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |