- java.lang.Object
-
- org.pdfsam.eventstudio.Annotations
-
final class Annotations extends java.lang.ObjectUtility methods processing beans to find annotated method or fields and register reflective listeners.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classAnnotations.ReflectiveListenerDescriptorDescriptor of a reflective listener holding information needed to create the listener(package private) static classAnnotations.ReflectiveMetadataHolds metadata retrieved from the reflective inspection of a bean
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOG
-
Constructor Summary
Constructors Modifier Constructor Description privateAnnotations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidaddIfAnnotated(Annotations.ReflectiveMetadata metadata, java.lang.reflect.Method method)private static java.util.List<java.lang.reflect.Method>getMethods(java.lang.Object bean)private static java.lang.StringgetStationNameFromFieldIfAny(java.lang.Object bean)private static java.lang.StringgetStationNameIfAnnotated(java.lang.reflect.Method method, java.lang.Object bean)static Annotations.ReflectiveMetadataprocess(java.lang.Object bean)
-
-
-
Method Detail
-
process
public static Annotations.ReflectiveMetadata process(java.lang.Object bean) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
- Throws:
java.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException
-
getMethods
private static java.util.List<java.lang.reflect.Method> getMethods(java.lang.Object bean)
- Returns:
- a list containing all the public methods (inherited and not) and all the private, package and protected (not inherited) methods of the given bean
-
addIfAnnotated
private static void addIfAnnotated(Annotations.ReflectiveMetadata metadata, java.lang.reflect.Method method)
-
getStationNameIfAnnotated
private static java.lang.String getStationNameIfAnnotated(java.lang.reflect.Method method, java.lang.Object bean) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException- Throws:
java.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessException
-
getStationNameFromFieldIfAny
private static java.lang.String getStationNameFromFieldIfAny(java.lang.Object bean) throws java.lang.IllegalAccessException- Parameters:
bean- the bean to be searched- Returns:
- a String value with the name of the station if an annotated field was found, null otherwise.
- Throws:
java.lang.IllegalAccessException
-
-