Class AdviceAnnotationEvaluator


  • public class AdviceAnnotationEvaluator
    extends Object
    • Constructor Detail

      • AdviceAnnotationEvaluator

        public AdviceAnnotationEvaluator()
    • 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 implement MethodInterceptor.
        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 inspect
        name - for a field with this name
        output - and a type of this Class
        Returns:
        the field's value on the annotation if found.