Class AnnotationFinder
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 Stringprivate static final Stringprivate static final Logger -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateAnnotationFinder(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 AnnotationFinderfindAnnotation(Class<?> annotation) Gets theAnnotationFinderfor the given Annotation-Type.static AnnotationFinderfindAnnotationByName(String annotationClassName) Gets theAnnotationFinderfor the given Annotation-Type Name.static AnnotationFinderGets theAnnotationFinderfor @ConstructorProperties-Annotation.private static <T extends Annotation>
Class<T> getOptionalAnnotationClass(String classname) <T extends Annotation>
Tin(Annotation[] annotations) private ObjectinvocateValueMethod(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 theAnnotationFinderfor the given Annotation-Type.- Parameters:
annotation-Class, that is a sub-type ofAnnotation- Returns:
AnnotationFinder
-
findAnnotationByName
Gets theAnnotationFinderfor the given Annotation-Type Name.- Parameters:
annotationClassName-String, that is a sub-type ofAnnotation- Returns:
AnnotationFinder
-
findConstructorProperties
Gets theAnnotationFinderfor @ConstructorProperties-Annotation.- Returns:
AnnotationFinder
-
in
-
valueIn
Looks for the annotationin(Annotation[])
and executes the "value" Method of it dynamically.- Parameters:
annotations- - Array ofAnnotationn.- 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
-