Package org.testng.internal.reflect
Class Parameter
- java.lang.Object
-
- org.testng.internal.reflect.Parameter
-
- All Implemented Interfaces:
AnnotatedElement
public class Parameter extends Object implements AnnotatedElement
This class can be replaceable by java.lang.reflect.Parameter if using jdk 1.8.- Author:
- Nitin Verma
-
-
Constructor Summary
Constructors Constructor Description Parameter(int index, Class<?> type, Annotation[] declaredAnnotations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Annotation>
TgetAnnotation(Class<T> annotationClass)Annotation[]getAnnotations()Annotation[]getDeclaredAnnotations()Class<?>getType()Returns aClassobject that identifies the declared type for the parameter represented by thisParameterobject.booleanisAnnotationPresent(Class<? extends Annotation> annotationClass)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
-
-
-
-
Constructor Detail
-
Parameter
public Parameter(int index, Class<?> type, Annotation[] declaredAnnotations)
-
-
Method Detail
-
getType
public Class<?> getType()
Returns aClassobject that identifies the declared type for the parameter represented by thisParameterobject.- Returns:
- a
Classobject identifying the declared type of the parameter represented by this object
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
- Specified by:
isAnnotationPresentin interfaceAnnotatedElement
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
- Specified by:
getAnnotationin interfaceAnnotatedElement
-
getAnnotations
public Annotation[] getAnnotations()
- Specified by:
getAnnotationsin interfaceAnnotatedElement
-
getDeclaredAnnotations
public Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement
-
-