Class AdviceAnnotationEvaluator
- java.lang.Object
-
- com.github.advisedtesting.core.internal.AdviceAnnotationEvaluator
-
public class AdviceAnnotationEvaluator extends Object
-
-
Constructor Summary
Constructors Constructor Description AdviceAnnotationEvaluator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetInstanceIfPresent(Annotation annotation)static StringgetNameIfPresent(Annotation annotation)static <T> TgetValueIfPresent(Annotation annotation, String name, Class<T> output)Finds the value of a field on an annotation.static List<Annotation>inspect(Annotation... annotations)Get a list of annotations in order (based on input) that have implementedBy field that is a class.
-
-
-
Method Detail
-
inspect
public static List<Annotation> inspect(Annotation... annotations)
Get a list of annotations in order (based on input) that have implementedBy field that is a class. implementedBy's class must implementMethodInterceptor.- Parameters:
annotations- array of annotations.- Returns:
- List of Advice annotations meant for tests.
-
getInstanceIfPresent
public static String getInstanceIfPresent(Annotation annotation)
-
getNameIfPresent
public static String getNameIfPresent(Annotation annotation)
-
getValueIfPresent
public static <T> T getValueIfPresent(Annotation annotation, String name, Class<T> output)
Finds the value of a field on an annotation.- Type Parameters:
T- the type of the field.- Parameters:
annotation- to inspectname- for a field with this nameoutput- and a type of this Class- Returns:
- the field's value on the annotation if found.
-
-