Package com.aispect.common.util
Class AiAnnotationUtils
java.lang.Object
com.aispect.common.util.AiAnnotationUtils
AI A dedicated annotation retrieval tool within the framework.
Support without Spring The environment handles interface inheritance and meta-annotation (multiple annotation) lookups.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends Annotation>
AfindAnnotation(Class<?> clazz, Class<A> annotationType) Find specific annotations on a class (supports inheritance from interfaces and parent classes, supports simple meta-annotations)static <A extends Annotation>
AfindAnnotation(Method method, Class<A> annotationType) Find specific annotations on methods (supports inheritance from methods of interfaces and parent classes, supports simple meta-annotations)
-
Constructor Details
-
AiAnnotationUtils
public AiAnnotationUtils()
-
-
Method Details
-
findAnnotation
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 classannotationType- Target annotation type- Returns:
- Annotation instance found, returned if not found null
-
findAnnotation
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 methodannotationType- Target annotation type- Returns:
- Annotation instance found, returned if not found null
-