public class JDK15AnnotationFinder extends java.lang.Object implements IAnnotationFinder
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.Class<? extends IAnnotation>,java.lang.Class<? extends java.lang.annotation.Annotation>> |
m_annotationMap |
private java.util.Map<Pair<java.lang.annotation.Annotation,?>,IAnnotation> |
m_annotations |
private JDK15TagFactory |
m_tagFactory |
private IAnnotationTransformer |
m_transformer |
Constructor and Description |
---|
JDK15AnnotationFinder(IAnnotationTransformer transformer) |
Modifier and Type | Method and Description |
---|---|
<A extends IAnnotation> |
findAnnotation(java.lang.Class<?> cls,
java.lang.Class<A> annotationClass) |
<A extends IAnnotation> |
findAnnotation(java.lang.Class<?> clazz,
java.lang.reflect.Method m,
java.lang.Class<A> annotationClass) |
private <A extends IAnnotation> |
findAnnotation(java.lang.Class cls,
java.lang.annotation.Annotation a,
java.lang.Class<A> annotationClass,
java.lang.Class<?> testClass,
java.lang.reflect.Constructor<?> testConstructor,
java.lang.reflect.Method testMethod,
Pair<java.lang.annotation.Annotation,?> p,
java.lang.Class<?> whichClass) |
<A extends IAnnotation> |
findAnnotation(java.lang.reflect.Constructor<?> cons,
java.lang.Class<A> annotationClass) |
<A extends IAnnotation> |
findAnnotation(ConstructorOrMethod com,
java.lang.Class<A> annotationClass) |
<A extends IAnnotation> |
findAnnotation(ITestNGMethod tm,
java.lang.Class<A> annotationClass) |
<A extends IAnnotation> |
findAnnotation(java.lang.reflect.Method m,
java.lang.Class<A> annotationClass) |
private <A extends java.lang.annotation.Annotation> |
findAnnotationInSuperClasses(java.lang.Class<?> cls,
java.lang.Class<A> a) |
java.lang.String[] |
findOptionalValues(java.lang.reflect.Constructor method) |
java.lang.String[] |
findOptionalValues(java.lang.reflect.Method method) |
boolean |
hasTestInstance(java.lang.reflect.Method method,
int i) |
private java.lang.String[] |
optionalValues(java.lang.annotation.Annotation[][] annotations) |
private void |
transform(IAnnotation a,
java.lang.Class<?> testClass,
java.lang.reflect.Constructor<?> testConstructor,
java.lang.reflect.Method testMethod,
java.lang.Class<?> whichClass) |
private JDK15TagFactory m_tagFactory
private java.util.Map<java.lang.Class<? extends IAnnotation>,java.lang.Class<? extends java.lang.annotation.Annotation>> m_annotationMap
private java.util.Map<Pair<java.lang.annotation.Annotation,?>,IAnnotation> m_annotations
private IAnnotationTransformer m_transformer
public JDK15AnnotationFinder(IAnnotationTransformer transformer)
private <A extends java.lang.annotation.Annotation> A findAnnotationInSuperClasses(java.lang.Class<?> cls, java.lang.Class<A> a)
public <A extends IAnnotation> A findAnnotation(java.lang.reflect.Method m, java.lang.Class<A> annotationClass)
findAnnotation
in interface IAnnotationFinder
m
- - The corresponding Method
annotationClass
- - The class on which annotation is to be looked for.public <A extends IAnnotation> A findAnnotation(java.lang.Class<?> clazz, java.lang.reflect.Method m, java.lang.Class<A> annotationClass)
findAnnotation
in interface IAnnotationFinder
public <A extends IAnnotation> A findAnnotation(ITestNGMethod tm, java.lang.Class<A> annotationClass)
findAnnotation
in interface IAnnotationFinder
public <A extends IAnnotation> A findAnnotation(ConstructorOrMethod com, java.lang.Class<A> annotationClass)
findAnnotation
in interface IAnnotationFinder
private void transform(IAnnotation a, java.lang.Class<?> testClass, java.lang.reflect.Constructor<?> testConstructor, java.lang.reflect.Method testMethod, java.lang.Class<?> whichClass)
public <A extends IAnnotation> A findAnnotation(java.lang.Class<?> cls, java.lang.Class<A> annotationClass)
findAnnotation
in interface IAnnotationFinder
cls
- - The corresponding class.annotationClass
- - The class on which annotation is to be looked for.public <A extends IAnnotation> A findAnnotation(java.lang.reflect.Constructor<?> cons, java.lang.Class<A> annotationClass)
findAnnotation
in interface IAnnotationFinder
cons
- - The corresponding Constructor
annotationClass
- - The class on which annotation is to be looked for.private <A extends IAnnotation> A findAnnotation(java.lang.Class cls, java.lang.annotation.Annotation a, java.lang.Class<A> annotationClass, java.lang.Class<?> testClass, java.lang.reflect.Constructor<?> testConstructor, java.lang.reflect.Method testMethod, Pair<java.lang.annotation.Annotation,?> p, java.lang.Class<?> whichClass)
public boolean hasTestInstance(java.lang.reflect.Method method, int i)
hasTestInstance
in interface IAnnotationFinder
public java.lang.String[] findOptionalValues(java.lang.reflect.Method method)
findOptionalValues
in interface IAnnotationFinder
null
if the parameter
isn't optional)public java.lang.String[] findOptionalValues(java.lang.reflect.Constructor method)
findOptionalValues
in interface IAnnotationFinder
null
if the parameter
isn't optional)private java.lang.String[] optionalValues(java.lang.annotation.Annotation[][] annotations)