Class JDK15TagFactory

java.lang.Object
org.testng.internal.annotations.JDK15TagFactory

public class JDK15TagFactory extends Object
This class creates implementations of IAnnotations based on the JDK5 annotation that was found on the Java element.
  • Field Details

  • Constructor Details

    • JDK15TagFactory

      public JDK15TagFactory()
  • Method Details

    • createTag

      public <A extends IAnnotation> A createTag(Class<?> cls, Method method, Annotation a, Class<A> annotationClass)
    • maybeCreateNewConfigurationTag

      private IAnnotation maybeCreateNewConfigurationTag(Annotation a, Class<?> annotationClass)
    • 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

      private IAnnotation createDataProviderTag(Method method, Annotation a)
    • createFactoryTag

      private IAnnotation createFactoryTag(Class<?> cls, Annotation a)
    • createObjectFactoryTag

      private IAnnotation createObjectFactoryTag()
    • createParametersTag

      private IAnnotation createParametersTag(Annotation a)
    • createListenersTag

      private IAnnotation createListenersTag(Annotation a)
    • createTestTag

      private IAnnotation createTestTag(Class<?> cls, Annotation a)
    • join

      private String[] join(String[] strings, String[] strings2)
    • 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

      private String[] findInheritedStringArray(Class<?> cls, 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 Object invokeMethod(Annotation test, String methodName)