Class Annotations


  • final class Annotations
    extends java.lang.Object
    Utility methods processing beans to find annotated method or fields and register reflective listeners.
    • Field Detail

      • LOG

        private static final org.slf4j.Logger LOG
    • Constructor Detail

      • Annotations

        private Annotations()
    • Method Detail

      • process

        public static Annotations.ReflectiveMetadata process​(java.lang.Object bean)
                                                      throws java.lang.IllegalAccessException,
                                                             java.lang.reflect.InvocationTargetException
        Throws:
        java.lang.IllegalAccessException
        java.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
      • 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.InvocationTargetException
        java.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