Package org.testng.internal.reflect
Class ReflectionHelper
java.lang.Object
org.testng.internal.reflect.ReflectionHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
acceptsStringArray
(Method method) static Method[]
excludingMain
(Class<?> clazz) static <T extends Annotation>
TfindAnnotation
(Class<?> typedTestClass, Class<T> annotation) A helper method that looks for a given annotation in the current class (or) in any of the super classesgetAllInterfaces
(Class<?> clazz) getDefaultMethods
(Class<?> clazz) static Method[]
getLocalMethods
(Class<?> clazz) private static boolean
isStaticVoid
(Method method)
-
Constructor Details
-
ReflectionHelper
public ReflectionHelper()
-
-
Method Details
-
getLocalMethods
- Returns:
- An array of all locally declared methods or equivalent thereof (such as default methods on Java 8 based interfaces that the given class implements).
-
excludingMain
- Returns:
- An array of all locally declared methods or equivalent thereof (such as default methods
on Java 8 based interfaces that the given class implements) but excludes the
main()
method alone.
-
findAnnotation
A helper method that looks for a given annotation in the current class (or) in any of the super classes- Type Parameters:
T
- - The annotation type- Parameters:
typedTestClass
- - The class to search forannotation
- - The annotation to look for- Returns:
- - Either the annotation if found (or)
null.
-
isStaticVoid
-
acceptsStringArray
-
getDefaultMethods
-
getAllInterfaces
-