Class MethodArgument
- java.lang.Object
-
- org.apache.commons.digester.annotations.reflect.MethodArgument
-
- All Implemented Interfaces:
AnnotatedElement
public final class MethodArgument extends Object implements AnnotatedElement
Class to supply the missing JavaAnnotatedElement
for method arguments.- Since:
- 2.1
-
-
Constructor Summary
Constructors Constructor Description MethodArgument(int index, Class<?> parameterType, Annotation[] annotations)
Creates a new method argument asAnnotatedElement
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Annotation>
TgetAnnotation(Class<T> annotationType)
Annotation[]
getAnnotations()
Annotation[]
getDeclaredAnnotations()
int
getIndex()
Returns the method argument index.Class<?>
getParameterType()
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
-
-
-
-
Constructor Detail
-
MethodArgument
public MethodArgument(int index, Class<?> parameterType, Annotation[] annotations)
Creates a new method argument asAnnotatedElement
.- Parameters:
index
- the method argument index.parameterType
- the method argument type.annotations
- the method argument annotations.
-
-
Method Detail
-
getIndex
public int getIndex()
Returns the method argument index.- Returns:
- the method argument index.
-
getParameterType
public Class<?> getParameterType()
Returns the method argument type.- Returns:
- the method argument type.
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
- Specified by:
getAnnotation
in interfaceAnnotatedElement
-
getAnnotations
public Annotation[] getAnnotations()
- Specified by:
getAnnotations
in interfaceAnnotatedElement
-
getDeclaredAnnotations
public Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfaceAnnotatedElement
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
- Specified by:
isAnnotationPresent
in interfaceAnnotatedElement
-
-