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 intThe 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.intgetIndex()Returns the method argument index.Class<?> Returns the method argument type.booleanisAnnotationPresent(Class<? extends Annotation> annotationType) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
getAnnotationin interfaceAnnotatedElement
-
getAnnotations
- Specified by:
getAnnotationsin interfaceAnnotatedElement
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotationsin 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:
isAnnotationPresentin interfaceAnnotatedElement
-