Package org.testng.internal.annotations
Class JDK15TagFactory
- java.lang.Object
-
- org.testng.internal.annotations.JDK15TagFactory
-
public class JDK15TagFactory extends java.lang.ObjectThis class creates implementations of IAnnotations based on the JDK5 annotation that was found on the Java element.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interfaceJDK15TagFactory.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_CLASSprivate 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 IAnnotationcreateConfigurationTag(boolean beforeSuite, boolean afterSuite, boolean beforeTest, boolean afterTest, java.lang.String[] beforeGroups, boolean isBeforeGroups, java.lang.String[] afterGroups, boolean isAfterGroups, 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, boolean firstTimeOnly, boolean lastTimeOnly, long timeOut, java.lang.String[] groupFilters)private IAnnotationcreateDataProviderTag(java.lang.reflect.Method method, java.lang.annotation.Annotation a)private IAnnotationcreateFactoryTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a)private IAnnotationcreateListenersTag(java.lang.annotation.Annotation a)private IAnnotationcreateObjectFactoryTag()private IAnnotationcreateParametersTag(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)private IAnnotationcreateTestTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a)private <T> TfindInherited(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.String methodName)Find the value of a String[] annotation.private java.lang.ObjectinvokeMethod(java.lang.annotation.Annotation test, java.lang.String methodName)private java.lang.String[]join(java.lang.String[] strings, java.lang.String[] strings2)private IAnnotationmaybeCreateNewConfigurationTag(java.lang.annotation.Annotation a, java.lang.Class<?> annotationClass)
-
-
-
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)
-
maybeCreateNewConfigurationTag
private IAnnotation maybeCreateNewConfigurationTag(java.lang.annotation.Annotation a, java.lang.Class<?> annotationClass)
-
createConfigurationTag
private IAnnotation createConfigurationTag(boolean beforeSuite, boolean afterSuite, boolean beforeTest, boolean afterTest, java.lang.String[] beforeGroups, boolean isBeforeGroups, java.lang.String[] afterGroups, boolean isAfterGroups, 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, boolean firstTimeOnly, boolean lastTimeOnly, long timeOut, java.lang.String[] groupFilters)
-
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()
-
createParametersTag
private IAnnotation createParametersTag(java.lang.annotation.Annotation a)
-
createListenersTag
private IAnnotation createListenersTag(java.lang.annotation.Annotation a)
-
createTestTag
private IAnnotation createTestTag(java.lang.Class<?> cls, java.lang.annotation.Annotation a)
-
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.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)
-
-