java.lang.Object
org.eclipse.yasson.internal.AnnotationFinder
Finds an annotation including inherited annotations (e.g. meta-annotations).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class<? extends Annotation>
private final String
private static final String
private static final Logger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
AnnotationFinder
(String annotationClassName, Class<? extends Annotation> annotationClass) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Annotation>
TfindAnnotation
(Annotation[] declaredAnnotations, Class<T> annotationClass, Set<Annotation> processed) Searches for annotation, collects processed, to avoid StackOverflow.static AnnotationFinder
findAnnotation
(Class<?> annotation) Gets theAnnotationFinder
for the given Annotation-Type.static AnnotationFinder
findAnnotationByName
(String annotationClassName) Gets theAnnotationFinder
for the given Annotation-Type Name.static AnnotationFinder
Gets theAnnotationFinder
for @ConstructorProperties-Annotation.private static <T extends Annotation>
Class<T>getOptionalAnnotationClass
(String classname) <T extends Annotation>
Tin
(Annotation[] annotations) private Object
invocateValueMethod
(Annotation annotation) toString()
valueIn
(Annotation[] annotations) Looks for the annotationin(Annotation[])
and executes the "value" Method of it dynamically.
-
Field Details
-
CONSTRUCTOR_PROPERTIES_ANNOTATION
- See Also:
-
LOGGER
-
annotationClassName
-
annotationClass
-
-
Constructor Details
-
AnnotationFinder
-
-
Method Details
-
findAnnotation
Gets theAnnotationFinder
for the given Annotation-Type.- Parameters:
annotation
-Class
, that is a sub-type ofAnnotation
- Returns:
AnnotationFinder
-
findAnnotationByName
Gets theAnnotationFinder
for the given Annotation-Type Name.- Parameters:
annotationClassName
-String
, that is a sub-type ofAnnotation
- Returns:
AnnotationFinder
-
findConstructorProperties
Gets theAnnotationFinder
for @ConstructorProperties-Annotation.- Returns:
AnnotationFinder
-
in
-
valueIn
Looks for the annotationin(Annotation[])
and executes the "value" Method of it dynamically.- Parameters:
annotations
- - Array ofAnnotation
n.- Returns:
Object
-
invocateValueMethod
-
getOptionalAnnotationClass
-
findAnnotation
public static <T extends Annotation> T findAnnotation(Annotation[] declaredAnnotations, Class<T> annotationClass, Set<Annotation> processed) Searches for annotation, collects processed, to avoid StackOverflow. -
toString
-