org.testng.internal.annotations
Interface IAnnotationFinder
- All Known Implementing Classes:
- JDK14AnnotationFinder, JDK15AnnotationFinder
public interface IAnnotationFinder
This interface defines how annotations are found on classes, methods
and constructors. It will be implemented by both JDK 1.4 and JDK 5
annotation finders.
- Author:
- Cedric Beust
findAnnotation
IAnnotation findAnnotation(java.lang.Class cls,
java.lang.Class annotationClass)
- Parameters:
cls
- annotationName
-
- Returns:
- The annotation on the class or null if none found.
findAnnotation
IAnnotation findAnnotation(java.lang.reflect.Method m,
java.lang.Class annotationClass)
- Parameters:
m
- annotationName
-
- Returns:
- The annotation on the method.
If not found, return the annotation on the declaring class.
If not found, return null.
findAnnotation
IAnnotation findAnnotation(java.lang.reflect.Constructor m,
java.lang.Class annotationClass)
- Parameters:
m
- annotationName
-
- Returns:
- The annotation on the method.
If not found, return the annotation on the declaring class.
If not found, return null.
addSourceDirs
void addSourceDirs(java.lang.String[] dirs)
hasTestInstance
boolean hasTestInstance(java.lang.reflect.Method method,
int i)
- Returns:
- true if the ith parameter of the given method has the annotation @TestInstance.
findOptionalValues
java.lang.String[] findOptionalValues(java.lang.reflect.Method method)
- Returns:
- the @Optional values of this method's parameters (
null
if the parameter isn't optional)
findOptionalValues
java.lang.String[] findOptionalValues(java.lang.reflect.Constructor ctor)
- Returns:
- the @Optional values of this method's parameters (
null
if the parameter isn't optional)
Copyright © 2010. All Rights Reserved.