| Modifier and Type | Class and Description |
|---|---|
| pack-priv static record | 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. |
| pack-priv static enum | ReflectionHelper.ArgumentsMatchKind
Arguments match kinds. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static ReflectionHelper. | Returns: a MatchInfo object indicating what kind of match it was, ornull if it was not a matchthe types the method/constructor is expecting expectedArgTypes, List<TypeDescriptor> the types that are being supplied at the point of invocation suppliedArgTypes, TypeConverter a registered type converter typeConverter)Compare argument arrays and return information about whether they match. |
| pack-priv static ReflectionHelper. | Returns: a MatchInfo object indicating what kind of match it was, ornull if it was not a matchthe types the method/constructor is expecting expectedArgTypes, List<TypeDescriptor> the types that are being supplied at the point of invocation suppliedArgTypes, TypeConverter a registered type converter typeConverter)Compare argument arrays and return information about whether they match. |
| public static boolean | Returns: true if some kind of conversion occurred on the argumentthe converter to use for type conversions converter, Object[] the arguments to convert to the requested parameter types arguments, Method the target Method method)Convert a supplied set of arguments into the requested types. |
| public static boolean | Returns: true if some kind of conversion occurred on an argumentthe type converter to use for attempting conversions converter, Object[] the actual arguments that need conversion arguments, MethodHandle the target MethodHandle methodHandle, Integer the known position of the varargs argument, if any
( varargsPosition)null if not varargs)Takes an input set of argument values and converts them to the types specified as the required parameter types. |
| pack-priv static boolean | Returns: true if some kind of conversion occurred on an argumentthe type converter to use for attempting conversions converter, Object[] the actual arguments that need conversion arguments, Executable the target Method or Constructor executable, Integer the known position of the varargs argument, if any
( varargsPosition)null if not varargs)Takes an input set of argument values and converts them to the types specified as the required parameter types. |
| public static int | getTypeDifferenceWeight(List<TypeDescriptor> paramTypes, List<TypeDescriptor> argTypes)
Based on |
| private static boolean | Returns: true if the supplied value is the first entry in the arraythe value to check for in the array value, Object an array object that may have the supplied value as the first element possibleArray)Check if the supplied value is the first entry in the array represented by the possibleArray value. |
| public static Object[] | Returns: a repackaged array of arguments where any varargs setup has been donethe types of the parameters for the invocation requiredParameterTypes, Object... the arguments to be setup ready for the invocation args)Package up the arguments so that they correctly match what is expected in requiredParameterTypes. |
| ReflectionHelper | back to summary |
|---|---|
| public ReflectionHelper() | |
| compareArguments | back to summary |
|---|---|
| pack-priv static ReflectionHelper. Compare argument arrays and return information about whether they match. A supplied type converter and conversionAllowed flag allow for matches to take into account that a type may be transformed into a different type by the converter.
| |
| compareArgumentsVarargs | back to summary |
|---|---|
| pack-priv static ReflectionHelper. Compare argument arrays and return information about whether they match. A supplied type converter and conversionAllowed flag allow for matches to take into account that a type may be transformed into a different type by the converter. This variant of compareArguments also allows for a varargs match.
| |
| convertAllArguments | back to summary |
|---|---|
| public static boolean convertAllArguments(TypeConverter converter, Object[] arguments, Method method) throws SpelEvaluationException Convert a supplied set of arguments into the requested types. If the parameterTypes are related to a varargs method then the final entry in the parameterTypes array is going to be an array itself whose component type should be used as the conversion target for extraneous arguments. (For example, if the parameterTypes are {Integer, String[]} and the input arguments are {Integer, boolean, float} then both the boolean and float must be converted to strings). This method does *not* repackage the arguments into a form suitable for the varargs invocation - a subsequent call to setupArgumentsForVarargsInvocation handles that.
| |
| convertAllMethodHandleArguments | back to summary |
|---|---|
| public static boolean convertAllMethodHandleArguments(TypeConverter converter, Object[] arguments, MethodHandle methodHandle, Integer varargsPosition) throws EvaluationException Takes an input set of argument values and converts them to the types specified as the required parameter types. The arguments are converted 'in-place' in the input array.
| |
| convertArguments | back to summary |
|---|---|
| pack-priv static boolean convertArguments(TypeConverter converter, Object[] arguments, Executable executable, Integer varargsPosition) throws EvaluationException Takes an input set of argument values and converts them to the types specified as the required parameter types. The arguments are converted 'in-place' in the input array.
| |
| getTypeDifferenceWeight | back to summary |
|---|---|
| public static int getTypeDifferenceWeight(List<TypeDescriptor> paramTypes, List<TypeDescriptor> argTypes) Based on | |
| isFirstEntryInArray | back to summary |
|---|---|
| private static boolean isFirstEntryInArray(Object value, Object possibleArray) Check if the supplied value is the first entry in the array represented by the possibleArray value. | |
| setupArgumentsForVarargsInvocation | back to summary |
|---|---|
| public static Object[] setupArgumentsForVarargsInvocation(Class<?>[] requiredParameterTypes, Object... args) Package up the arguments so that they correctly match what is expected in requiredParameterTypes. For example, if requiredParameterTypes is | |
| Modifier and Type | Field and Description |
|---|---|
| private final ReflectionHelper. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object
the reference object with which to compare. o)Implements abstract java. |
| public final int | |
| public boolean | |
| public boolean | |
| public boolean | |
| public ReflectionHelper. | |
| public String | toString()
Implements abstract java. |
| kind | back to summary |
|---|---|
| private final ReflectionHelper. Record Component accessed by kind(). the kind of match that was achieved | |
| ArgumentsMatchInfo | back to summary |
|---|---|
| pack-priv ArgumentsMatchInfo(ReflectionHelper. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| isCloseMatch | back to summary |
|---|---|
| public boolean isCloseMatch() | |
| isExactMatch | back to summary |
|---|---|
| public boolean isExactMatch() | |
| isMatchRequiringConversion | back to summary |
|---|---|
| public boolean isMatchRequiringConversion() | |
| kind | back to summary |
|---|---|
| public ReflectionHelper. Record Component getter of kind.
| |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ReflectionHelper. | CLOSE
A close match is where the parameter types either exactly match or are assignment-compatible. |
| public static final ReflectionHelper. | EXACT
An exact match is where the parameter types exactly match what the method/constructor is expecting. |
| public static final ReflectionHelper. | REQUIRES_CONVERSION
A conversion match is where the type converter must be used to transform some of the parameter types. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ReflectionHelper. | |
| public static ReflectionHelper. |
| CLOSE | back to summary |
|---|---|
| public static final ReflectionHelper. A close match is where the parameter types either exactly match or are assignment-compatible. | |
| EXACT | back to summary |
|---|---|
| public static final ReflectionHelper. An exact match is where the parameter types exactly match what the method/constructor is expecting. | |
| REQUIRES_CONVERSION | back to summary |
|---|---|
| public static final ReflectionHelper. A conversion match is where the type converter must be used to transform some of the parameter types. | |
| ArgumentsMatchKind | back to summary |
|---|---|
| private ArgumentsMatchKind() | |
| valueOf | back to summary |
|---|---|
| public static ReflectionHelper. | |
| values | back to summary |
|---|---|
| public static ReflectionHelper. | |