Package hudson.util
Class ReflectionUtils.Parameter
- java.lang.Object
-
- hudson.util.ReflectionUtils.Parameter
-
- All Implemented Interfaces:
AnnotatedElement
- Enclosing class:
- ReflectionUtils
public static final class ReflectionUtils.Parameter extends Object implements AnnotatedElement
-
-
Constructor Summary
Constructors Constructor Description Parameter(hudson.util.ReflectionUtils.MethodInfo parent, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends Annotation>
Aannotation(Class<A> type)
Gets the specified annotation on this parameter or null.Annotation[]
annotations()
Gets all the annotations on this parameter.Type
genericType()
Gets the unerased generic type of this parameter.<T extends Annotation>
TgetAnnotation(Class<T> type)
Annotation[]
getAnnotations()
Annotation[]
getDeclaredAnnotations()
int
index()
0-origin index of this parameter.boolean
isAnnotationPresent(Class<? extends Annotation> type)
String
name()
Name of this parameter.Class<?>
type()
Gets the type of this parameter.-
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
-
Parameter
public Parameter(hudson.util.ReflectionUtils.MethodInfo parent, int index)
-
-
Method Detail
-
index
public int index()
0-origin index of this parameter.
-
type
public Class<?> type()
Gets the type of this parameter.
-
genericType
public Type genericType()
Gets the unerased generic type of this parameter.
-
annotations
public Annotation[] annotations()
Gets all the annotations on this parameter.
-
annotation
public <A extends Annotation> A annotation(Class<A> type)
Gets the specified annotation on this parameter or null.
-
name
public String name()
Name of this parameter. If unknown, this method returns null.
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> type)
- Specified by:
isAnnotationPresent
in interfaceAnnotatedElement
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> type)
- Specified by:
getAnnotation
in interfaceAnnotatedElement
-
getAnnotations
public Annotation[] getAnnotations()
- Specified by:
getAnnotations
in interfaceAnnotatedElement
-
getDeclaredAnnotations
public Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfaceAnnotatedElement
-
-