Package org.testng.internal.annotations
Class JDK15TagFactory
java.lang.Object
org.testng.internal.annotations.JDK15TagFactory
This class creates implementations of IAnnotations based on the JDK5 annotation that was found on
the Java element.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface
This interface is used to calculate the default value for various annotation return types. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final JDK15TagFactory.Default<Class<?>>
private static final JDK15TagFactory.Default<String>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate IAnnotation
createConfigurationTag
(boolean beforeSuite, boolean afterSuite, boolean beforeTest, boolean afterTest, String[] beforeGroups, boolean isBeforeGroups, String[] afterGroups, boolean isAfterGroups, boolean beforeClass, boolean afterClass, boolean beforeMethod, boolean afterMethod, boolean alwaysRun, String[] dependsOnGroups, String[] dependsOnMethods, String description, boolean enabled, String[] groups, boolean inheritGroups, boolean firstTimeOnly, boolean lastTimeOnly, long timeOut, String[] groupFilters) private IAnnotation
createDataProviderTag
(Method method, Annotation a) private IAnnotation
createFactoryTag
(Class<?> cls, Annotation a) private IAnnotation
private IAnnotation
private IAnnotation
<A extends IAnnotation>
AcreateTag
(Class<?> cls, Method method, Annotation a, Class<A> annotationClass) private IAnnotation
createTestTag
(Class<?> cls, Annotation a) private <T> T
findInherited
(T methodValue, Class<?> cls, Class<? extends Annotation> annotationClass, 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 String[]
findInheritedStringArray
(Class<?> cls, String methodName) Find the value of a String[] annotation.private Object
invokeMethod
(Annotation test, String methodName) private String[]
private IAnnotation
maybeCreateNewConfigurationTag
(Annotation a, Class<?> annotationClass)
-
Field Details
-
DEFAULT_CLASS
-
DEFAULT_STRING
-
-
Constructor Details
-
JDK15TagFactory
public JDK15TagFactory()
-
-
Method Details
-
createTag
public <A extends IAnnotation> A createTag(Class<?> cls, Method method, Annotation a, Class<A> annotationClass) -
maybeCreateNewConfigurationTag
-
createConfigurationTag
private IAnnotation createConfigurationTag(boolean beforeSuite, boolean afterSuite, boolean beforeTest, boolean afterTest, String[] beforeGroups, boolean isBeforeGroups, String[] afterGroups, boolean isAfterGroups, boolean beforeClass, boolean afterClass, boolean beforeMethod, boolean afterMethod, boolean alwaysRun, String[] dependsOnGroups, String[] dependsOnMethods, String description, boolean enabled, String[] groups, boolean inheritGroups, boolean firstTimeOnly, boolean lastTimeOnly, long timeOut, String[] groupFilters) -
createDataProviderTag
-
createFactoryTag
-
createObjectFactoryTag
-
createParametersTag
-
createListenersTag
-
createTestTag
-
join
-
findInherited
private <T> T findInherited(T methodValue, Class<?> cls, Class<? extends Annotation> annotationClass, 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
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
-