Class EventReflection


  • public class EventReflection
    extends Object
    This class manages internally event's reflection operations.
    • Constructor Detail

      • EventReflection

        public EventReflection()
    • Method Detail

      • isHandledMethod

        public static boolean isHandledMethod​(Method method)
        Check if specified method its an Event handler.
        Parameters:
        method - Specified method to check.
        Returns:
        true if its a event handler method.
      • getHandledMethodsFrom

        public static List<Method> getHandledMethodsFrom​(Class<?> classListener)
        This method will obtain all methods with the EventHandler annotation.
        Parameters:
        classListener - Listener class handling events.
        Returns:
        List of reflected methods.
      • getEventFromMethod

        public static Class<?> getEventFromMethod​(Method method)
        Obtain event class from reflected method.
        Parameters:
        method - Reflected method to find event class.
        Returns:
        reflected event class from specified method.
      • getEventPriorityFromMethod

        public static EventPriority getEventPriorityFromMethod​(Method method)
        Obtain EventPriority from reflection method.
        Parameters:
        method - Reflected method to find the EventPriority.
        Returns:
        EventPriority of the event method.
      • getIgnoreCancelledFromMethod

        public static boolean getIgnoreCancelledFromMethod​(Method method)
        Obtain 'ignoreCancelled' value from reflection method.
        Parameters:
        method - Reflected method to get the 'ignoreCancelled' value.
        Returns:
        'true' when ignoreCancelled was enabled.