Package me.nurio.events
Class EventReflection
- java.lang.Object
-
- me.nurio.events.EventReflection
-
public class EventReflection extends Object
This class manages internally event's reflection operations.
-
-
Constructor Summary
Constructors Constructor Description EventReflection()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<?>getEventFromMethod(Method method)Obtain event class from reflected method.static EventPrioritygetEventPriorityFromMethod(Method method)ObtainEventPriorityfrom reflection method.static List<Method>getHandledMethodsFrom(Class<?> classListener)This method will obtain all methods with the EventHandler annotation.static booleangetIgnoreCancelledFromMethod(Method method)Obtain 'ignoreCancelled' value from reflection method.static booleanisHandledMethod(Method method)Check if specified method its an Event handler.
-
-
-
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)
ObtainEventPriorityfrom 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.
-
-