Class AiAnnotationUtils

java.lang.Object
com.aispect.common.util.AiAnnotationUtils

public class AiAnnotationUtils extends Object
AI A dedicated annotation retrieval tool within the framework. Support without Spring The environment handles interface inheritance and meta-annotation (multiple annotation) lookups.
  • Constructor Details

    • AiAnnotationUtils

      public AiAnnotationUtils()
  • Method Details

    • findAnnotation

      public static <A extends Annotation> A findAnnotation(Class<?> clazz, Class<A> annotationType)
      Find specific annotations on a class (supports inheritance from interfaces and parent classes, supports simple meta-annotations)
      Type Parameters:
      A - Annotation paradigm
      Parameters:
      clazz - target class
      annotationType - Target annotation type
      Returns:
      Annotation instance found, returned if not found null
    • findAnnotation

      public static <A extends Annotation> A findAnnotation(Method method, Class<A> annotationType)
      Find specific annotations on methods (supports inheritance from methods of interfaces and parent classes, supports simple meta-annotations)
      Type Parameters:
      A - Annotation paradigm
      Parameters:
      method - target method
      annotationType - Target annotation type
      Returns:
      Annotation instance found, returned if not found null