public final class MethodArgument
extends java.lang.Object
implements java.lang.reflect.AnnotatedElement
AnnotatedElement
for method
arguments.Modifier and Type | Field and Description |
---|---|
private java.lang.annotation.Annotation[] |
annotations
The method argument annotations.
|
private int |
index
The method argument index.
|
private java.lang.Class<?> |
parameterType
The method argument type.
|
Constructor and Description |
---|
MethodArgument(int index,
java.lang.Class<?> parameterType,
java.lang.annotation.Annotation[] annotations)
Creates a new method argument as
AnnotatedElement . |
Modifier and Type | Method and Description |
---|---|
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationType) |
java.lang.annotation.Annotation[] |
getAnnotations() |
private java.lang.annotation.Annotation[] |
getAnnotationsArrayCopy()
Returns an annotations array, copy of the declared annotations in this
method argument.
|
java.lang.annotation.Annotation[] |
getDeclaredAnnotations() |
int |
getIndex()
Returns the method argument index.
|
java.lang.Class<?> |
getParameterType()
Returns the method argument type.
|
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) |
private final int index
private final java.lang.Class<?> parameterType
private final java.lang.annotation.Annotation[] annotations
public MethodArgument(int index, java.lang.Class<?> parameterType, java.lang.annotation.Annotation[] annotations)
AnnotatedElement
.index
- the method argument index.parameterType
- the method argument type.annotations
- the method argument annotations.public int getIndex()
public java.lang.Class<?> getParameterType()
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationType)
getAnnotation
in interface java.lang.reflect.AnnotatedElement
public java.lang.annotation.Annotation[] getAnnotations()
getAnnotations
in interface java.lang.reflect.AnnotatedElement
public java.lang.annotation.Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations
in interface java.lang.reflect.AnnotatedElement
private java.lang.annotation.Annotation[] getAnnotationsArrayCopy()
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
isAnnotationPresent
in interface java.lang.reflect.AnnotatedElement