Package com.ultikits.ultitools.utils
Class AnnotationUtils
java.lang.Object
com.ultikits.ultitools.utils.AnnotationUtils
Utility class for annotation processing operations.
Provides methods to find annotations on classes including inherited annotations.
- Since:
- 6.0.0
- Author:
- wisdomme
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor to prevent instantiation. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Annotation>
TfindAnnotation(Class<?> clazz, Class<T> annotationType) Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
AnnotationUtils
private AnnotationUtils()Private constructor to prevent instantiation.
-
-
Method Details
-
findAnnotation
@Deprecated(since="6.3.0", forRemoval=true) public static <T extends Annotation> T findAnnotation(Class<?> clazz, Class<T> annotationType) Deprecated, for removal: This API element is subject to removal in a future version.This legacy lookup only walks one meta-annotation level and never merges@AliasForoverrides. UseMergedAnnotationResolver.find(java.lang.Class<?>, java.lang.Class<A>)instead, which walks the whole annotation tree and applies any@AliasForoverride found along the way.Find an annotation on a class, searching up the inheritance hierarchy if not found directly.- Type Parameters:
T- the annotation type- Parameters:
clazz- the class to search for the annotationannotationType- the type of annotation to find- Returns:
- the annotation if found, or null if not found
- Scheduled removal version:
- 6.4.0
-
@AliasForoverrides.