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