Class MethodArgument
java.lang.Object
org.apache.commons.digester3.annotations.reflect.MethodArgument
- All Implemented Interfaces:
AnnotatedElement
Class to supply the missing Java
AnnotatedElement
for method arguments.- Since:
- 2.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Annotation[]
The method argument annotations.private final int
The method argument index.private final Class
<?> The method argument type. -
Constructor Summary
ConstructorsConstructorDescriptionMethodArgument
(int index, Class<?> parameterType, Annotation[] annotations) Creates a new method argument asAnnotatedElement
. -
Method Summary
Modifier and TypeMethodDescription<T extends Annotation>
TgetAnnotation
(Class<T> annotationType) private Annotation[]
Returns an annotations array, copy of the declared annotations in this method argument.int
getIndex()
Returns the method argument index.Class
<?> Returns the method argument type.boolean
isAnnotationPresent
(Class<? extends Annotation> annotationType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
-
Field Details
-
index
private final int indexThe method argument index. -
parameterType
The method argument type. -
annotations
The method argument annotations.
-
-
Constructor Details
-
MethodArgument
Creates a new method argument asAnnotatedElement
.- Parameters:
index
- the method argument index.parameterType
- the method argument type.annotations
- the method argument annotations.
-
-
Method Details
-
getIndex
public int getIndex()Returns the method argument index.- Returns:
- the method argument index.
-
getParameterType
Returns the method argument type.- Returns:
- the method argument type.
-
getAnnotation
- Specified by:
getAnnotation
in interfaceAnnotatedElement
-
getAnnotations
- Specified by:
getAnnotations
in interfaceAnnotatedElement
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotations
in interfaceAnnotatedElement
-
getAnnotationsArrayCopy
Returns an annotations array, copy of the declared annotations in this method argument.- Returns:
- an annotations array, copy of the declared annotations in this method argument.
-
isAnnotationPresent
- Specified by:
isAnnotationPresent
in interfaceAnnotatedElement
-