Class ParameterTypes
java.lang.Object
org.springframework.data.util.ParameterTypes
Abstraction over a list of parameter value types. Allows to check whether a list of parameter values with the given
type setup is a candidate for the invocation of a given
Method (see areValidFor(Method)). This is
necessary to properly match parameter values against methods declaring varargs arguments. The implementation favors
direct matches and only computes the alternative sets of types to be considered if the primary one doesn't match.- Since:
- 2.1.7
- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorsConstructorDescriptionParameterTypes(List<TypeDescriptor> types, Lazy<Collection<ParameterTypes>> alternatives) -
Method Summary
Modifier and TypeMethodDescriptionbooleanareValidFor(Method method) Returns whether the parameter types are valid for the givenMethod.booleanbooleanexactlyMatchParametersOf(Method method) Returns whether the current parameter types match the givenMethod's parameters exactly, i.e. they're equal, not only assignable.protected @Nullable ParameterTypesprotected final @Nullable ParameterTypesgetParent(TypeDescriptor tail) inthashCode()static ParameterTypesof(List<TypeDescriptor> types) Returns theParameterTypesfor the given list ofTypeDescriptors.toString()protected @Nullable ParameterTypes
-
Constructor Details
-
ParameterTypes
-
-
Method Details
-
of
Returns theParameterTypesfor the given list ofTypeDescriptors.- Parameters:
types- must not be null.- Returns:
-
areValidFor
-
exactlyMatchParametersOf
-
toString
-
getParent
-
getParent
-
withLastVarArgs
-
equals
-
hashCode
-