java.lang.Object
io.lettuce.core.dynamic.parameter.Parameter
- Direct Known Subclasses:
ExecutionSpecificParameters.ExecutionAwareParameter
public class Parameter extends Object
Abstracts a method parameter and exposes access to type and parameter information.
- Since:
- 5.0
- Author:
- Mark Paluch
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description <A extends Annotation>
AfindAnnotation(Class<A> annotationType)Return the parameter annotation of the given type, if available.List<? extends Annotation>getAnnotations()Return all parameter annotations.StringgetName()intgetParameterIndex()Class<?>getParameterType()TypeInformation<?>getTypeInformation()booleanisAssignableTo(Class<?> target)Check whether the parameter is assignable totarget.booleanisSpecialParameter()
-
Constructor Details
-
Parameter
-
-
Method Details
-
findAnnotation
Return the parameter annotation of the given type, if available.- Parameters:
annotationType- the annotation type to look for- Returns:
- the annotation object, or
nullif not found
-
getAnnotations
Return all parameter annotations.- Returns:
- the
Listof annotation objects.
-
getParameterIndex
public int getParameterIndex()- Returns:
- the parameter index.
-
getParameterType
- Returns:
- the parameter type.
-
getTypeInformation
- Returns:
- the parameter
TypeInformation.
-
isAssignableTo
Check whether the parameter is assignable totarget.- Parameters:
target- must not benull.- Returns:
-
isSpecialParameter
public boolean isSpecialParameter()- Returns:
trueif the parameter is a special parameter.
-
getName
- Returns:
- the parameter name or
nullif not available.
-