Top Description Fields Constructors Methods
org.testng.internal.annotations

public Class AnnotationHelper

extends Object
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.reflect.Constructor, .Method, .Modifier, java.util.Arrays, .List, .Map, .Objects, java.util.function.Predicate, org.testng.ITestNGMethod, .ITestObjectFactory, org.testng.annotations.IAnnotation, .IConfigurationAnnotation, .IDataProviderAnnotation, .IFactoryAnnotation, .IParametersAnnotation, .ITestAnnotation, org.testng.collections.Maps, org.testng.internal.ConstructorOrMethod, .TestNGMethod, .Utils, org.testng.internal.reflect.ReflectionHelper, org.testng.log4testng.Logger, org.testng.xml.XmlTest

Helper methods to find @Test and @Configuration tags. They minimize the amount of casting we need to do.

Field Summary

Modifier and TypeField and Description
private static final List<Class<? extends IAnnotation>>
private static final List<Class<? extends IAnnotation>>
private static final Logger
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static IConfigurationAnnotation
private static String

Returns:

A hashcode representing the name of this method and its parameters, but without its class
createMethodKey
(Method m)

public static <A extends Annotation> A
findAnnotationSuperClasses(Class<A> annotationClass, Class<?> parameterClass)

public static IConfigurationAnnotation
public static IConfigurationAnnotation
public static IFactoryAnnotation
public static IFactoryAnnotation
public static ITestNGMethod[]
findMethodsWithAnnotation(ITestObjectFactory objectFactory, Class<?> rootClass, Class<? extends IAnnotation> annotationClass, IAnnotationFinder annotationFinder, XmlTest xmlTest)

public static ITestAnnotation
public static ITestAnnotation
public static ITestAnnotation
private static void
public static List<Class<? extends IAnnotation>>
pack-priv static <A extends Annotation> A
pack-priv static <A extends Annotation> A
pack-priv static <A extends Annotation> A
private static boolean
private static boolean
isAnnotationPresent(IAnnotationFinder annotationFinder, Method m, Class<? extends IAnnotation> annotationClass)

private static boolean
isAnnotationPresent(IAnnotationFinder annotationFinder, Class<?> cls, Class<? extends IAnnotation> annotationClass)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALL_ANNOTATIONSback to summary
private static final List<Class<? extends IAnnotation>> ALL_ANNOTATIONS
CONFIGURATION_CLASSESback to summary
private static final List<Class<? extends IAnnotation>> CONFIGURATION_CLASSES
LOGGERback to summary
private static final Logger LOGGER
SUFFIXback to summary
private static final String SUFFIX

Constructor Detail

AnnotationHelperback to summary
private AnnotationHelper()

Method Detail

createConfigurationback to summary
private static IConfigurationAnnotation createConfiguration(IConfigurationAnnotation bs, IConfigurationAnnotation as, IConfigurationAnnotation bt, IConfigurationAnnotation at, IConfigurationAnnotation bg, IConfigurationAnnotation ag, IConfigurationAnnotation bc, IConfigurationAnnotation ac, IConfigurationAnnotation bm, IConfigurationAnnotation am)
createMethodKeyback to summary
private static String createMethodKey(Method m)
Returns:String

A hashcode representing the name of this method and its parameters, but without its class

findAnnotationSuperClassesback to summary
public static <A extends Annotation> A findAnnotationSuperClasses(Class<A> annotationClass, Class<?> parameterClass)
findConfigurationback to summary
public static IConfigurationAnnotation findConfiguration(IAnnotationFinder finder, ConstructorOrMethod m)
findConfigurationback to summary
public static IConfigurationAnnotation findConfiguration(IAnnotationFinder finder, Method m)
findFactoryback to summary
public static IFactoryAnnotation findFactory(IAnnotationFinder finder, Method m)
findFactoryback to summary
public static IFactoryAnnotation findFactory(IAnnotationFinder finder, Constructor<?> c)
findMethodsWithAnnotationback to summary
public static ITestNGMethod[] findMethodsWithAnnotation(ITestObjectFactory objectFactory, Class<?> rootClass, Class<? extends IAnnotation> annotationClass, IAnnotationFinder annotationFinder, XmlTest xmlTest)
findTestback to summary
public static ITestAnnotation findTest(IAnnotationFinder finder, Class<?> cls)
findTestback to summary
public static ITestAnnotation findTest(IAnnotationFinder finder, Method m)
findTestback to summary
public static ITestAnnotation findTest(IAnnotationFinder finder, ITestNGMethod m)
finishInitializeback to summary
private static void finishInitialize(ConfigurationAnnotation result, IConfigurationAnnotation bs)
getAllAnnotationsback to summary
public static List<Class<? extends IAnnotation>> getAllAnnotations()
getAnnotationFromClassback to summary
pack-priv static <A extends Annotation> A getAnnotationFromClass(Class<?> clazz, Class<A> a)
getAnnotationFromConstructorback to summary
pack-priv static <A extends Annotation> A getAnnotationFromConstructor(Constructor<?> c, Class<A> a)
getAnnotationFromMethodback to summary
pack-priv static <A extends Annotation> A getAnnotationFromMethod(Method method, Class<A> a)
isAnnotationPresentback to summary
private static boolean isAnnotationPresent(IAnnotationFinder annotationFinder, Method m)
isAnnotationPresentback to summary
private static boolean isAnnotationPresent(IAnnotationFinder annotationFinder, Method m, Class<? extends IAnnotation> annotationClass)
isAnnotationPresentback to summary
private static boolean isAnnotationPresent(IAnnotationFinder annotationFinder, Class<?> cls, Class<? extends IAnnotation> annotationClass)