Package org.testng.internal.annotations
Class JDK15TagFactory
- java.lang.Object
-
- org.testng.internal.annotations.JDK15TagFactory
-
public class JDK15TagFactory extends java.lang.Object
This class creates implementations of IAnnotations based on the JDK5 annotation that was found on the Java element. Created on Dec 20, 2005
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
JDK15TagFactory.Default<T>
This interface is used to calculate the default value for various annotation return types.
-
Field Summary
Fields Modifier and Type Field Description private static JDK15TagFactory.Default<java.lang.Class<?>>
DEFAULT_CLASS
private static JDK15TagFactory.Default<java.lang.String>
DEFAULT_STRING
-
Constructor Summary
Constructors Constructor Description JDK15TagFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private IAnnotation
createConfigurationTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a, boolean beforeSuite, boolean afterSuite, boolean beforeTest, boolean afterTest, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, boolean beforeClass, boolean afterClass, boolean beforeMethod, boolean afterMethod, boolean alwaysRun, java.lang.String[] dependsOnGroups, java.lang.String[] dependsOnMethods, java.lang.String description, boolean enabled, java.lang.String[] groups, boolean inheritGroups, java.lang.String[] parameters, boolean firstTimeOnly, boolean lastTimeOnly, long timeOut)
private IAnnotation
createDataProviderTag(java.lang.reflect.Method method, java.lang.annotation.Annotation a)
private IAnnotation
createFactoryTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a)
private IAnnotation
createListenersTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a, IAnnotationTransformer transformer)
private IAnnotation
createObjectFactoryTag(java.lang.annotation.Annotation a)
private IAnnotation
createParametersTag(java.lang.annotation.Annotation a)
<A extends IAnnotation>
AcreateTag(java.lang.Class<?> cls, java.lang.reflect.Method method, java.lang.annotation.Annotation a, java.lang.Class<A> annotationClass, IAnnotationTransformer transformer)
private IAnnotation
createTestTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a, IAnnotationTransformer transformer)
private <T> T
findInherited(T methodValue, java.lang.Class<?> cls, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass, java.lang.String methodName, JDK15TagFactory.Default<T> def)
Find the value of an annotation, starting with the annotation found on the method, then the class and then parent classes until we either find a non-default value or we reach the top of the hierarchy (Object).private java.lang.String[]
findInheritedStringArray(java.lang.Class<?> cls, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass, java.lang.String methodName)
Find the value of a String[] annotation.private java.lang.Object
invokeMethod(java.lang.annotation.Annotation test, java.lang.String methodName)
private java.lang.String[]
join(java.lang.String[] strings, java.lang.String[] strings2)
private IAnnotation
maybeCreateNewConfigurationTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a, java.lang.Class<?> annotationClass)
private void
ppp(java.lang.String string)
-
-
-
Field Detail
-
DEFAULT_CLASS
private static final JDK15TagFactory.Default<java.lang.Class<?>> DEFAULT_CLASS
-
DEFAULT_STRING
private static final JDK15TagFactory.Default<java.lang.String> DEFAULT_STRING
-
-
Method Detail
-
createTag
public <A extends IAnnotation> A createTag(java.lang.Class<?> cls, java.lang.reflect.Method method, java.lang.annotation.Annotation a, java.lang.Class<A> annotationClass, IAnnotationTransformer transformer)
-
maybeCreateNewConfigurationTag
private IAnnotation maybeCreateNewConfigurationTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a, java.lang.Class<?> annotationClass)
-
createConfigurationTag
private IAnnotation createConfigurationTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a, boolean beforeSuite, boolean afterSuite, boolean beforeTest, boolean afterTest, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, boolean beforeClass, boolean afterClass, boolean beforeMethod, boolean afterMethod, boolean alwaysRun, java.lang.String[] dependsOnGroups, java.lang.String[] dependsOnMethods, java.lang.String description, boolean enabled, java.lang.String[] groups, boolean inheritGroups, java.lang.String[] parameters, boolean firstTimeOnly, boolean lastTimeOnly, long timeOut)
-
createDataProviderTag
private IAnnotation createDataProviderTag(java.lang.reflect.Method method, java.lang.annotation.Annotation a)
-
createFactoryTag
private IAnnotation createFactoryTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a)
-
createObjectFactoryTag
private IAnnotation createObjectFactoryTag(java.lang.annotation.Annotation a)
-
createParametersTag
private IAnnotation createParametersTag(java.lang.annotation.Annotation a)
-
createListenersTag
private IAnnotation createListenersTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a, IAnnotationTransformer transformer)
-
createTestTag
private IAnnotation createTestTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a, IAnnotationTransformer transformer)
-
join
private java.lang.String[] join(java.lang.String[] strings, java.lang.String[] strings2)
-
findInherited
private <T> T findInherited(T methodValue, java.lang.Class<?> cls, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass, java.lang.String methodName, JDK15TagFactory.Default<T> def)
Find the value of an annotation, starting with the annotation found on the method, then the class and then parent classes until we either find a non-default value or we reach the top of the hierarchy (Object).
-
findInheritedStringArray
private java.lang.String[] findInheritedStringArray(java.lang.Class<?> cls, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass, java.lang.String methodName)
Find the value of a String[] annotation. The difference with the findInherited method above is that TestNG aggregates String[] values across hierarchies. For example, of the method annotation has { "a", "b" } and the class has { "c" }, the returned value will be { "a", "b", "c" }.
-
invokeMethod
private java.lang.Object invokeMethod(java.lang.annotation.Annotation test, java.lang.String methodName)
-
ppp
private void ppp(java.lang.String string)
-
-