Class MethodHandleEventHandler
java.lang.Object
com.sk89q.worldedit.util.eventbus.EventHandler
com.sk89q.worldedit.util.eventbus.MethodHandleEventHandler
- All Implemented Interfaces:
Comparable<EventHandler>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sk89q.worldedit.util.eventbus.EventHandler
EventHandler.Priority
-
Constructor Summary
ModifierConstructorDescriptionprotected
MethodHandleEventHandler
(EventHandler.Priority priority, Object object, MethodHandle methodHandle, String methodName) Create a new event handler that uses MethodHandles to dispatch. -
Method Summary
Methods inherited from class com.sk89q.worldedit.util.eventbus.EventHandler
compareTo, getPriority, handleEvent, toString
-
Constructor Details
-
MethodHandleEventHandler
protected MethodHandleEventHandler(EventHandler.Priority priority, Object object, MethodHandle methodHandle, String methodName) Create a new event handler that uses MethodHandles to dispatch.- Parameters:
priority
- the priorityobject
- The object to invoke it onmethodHandle
- The handle to invokemethodName
- The name of the method (for equality checks)
-
-
Method Details
-
dispatch
Description copied from class:EventHandler
Dispatch the event.- Specified by:
dispatch
in classEventHandler
- Parameters:
event
- the event object- Throws:
Exception
- an exception that may be thrown
-
hashCode
public int hashCode()- Specified by:
hashCode
in classEventHandler
-
equals
- Specified by:
equals
in classEventHandler
-