java.lang.Object
org.pdfsam.eventstudio.Annotations
Utility methods processing beans to find annotated method or fields and register reflective listeners.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordDescriptor of a reflective listener holding information needed to create the listener(package private) static classHolds metadata retrieved from the reflective inspection of a bean -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddIfAnnotated(Annotations.ReflectiveMetadata metadata, Method method) getMethods(Object bean) private static Stringprivate static StringgetStationNameIfAnnotated(Method method, Object bean)
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG
-
-
Constructor Details
-
Annotations
private Annotations()
-
-
Method Details
-
process
public static Annotations.ReflectiveMetadata process(Object bean) throws IllegalAccessException, InvocationTargetException -
getMethods
- 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
-
getStationNameIfAnnotated
private static String getStationNameIfAnnotated(Method method, Object bean) throws InvocationTargetException, IllegalAccessException -
getStationNameFromFieldIfAny
- 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:
IllegalAccessException
-