Class 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.
    • 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>
      A
      createTag​(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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JDK15TagFactory

        public JDK15TagFactory()
    • 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)
      • 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)