Class LambdaListener
- java.lang.Object
-
- meteordevelopment.orbit.listeners.LambdaListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLambdaListener.Factory
-
Constructor Summary
Constructors Constructor Description LambdaListener(LambdaListener.Factory factory, java.lang.Class<?> klass, java.lang.Object object, java.lang.reflect.Method method)Creates a new lambda listener, can be used for both static and non-static methods.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcall(java.lang.Object event)Calls the listener with the specified event.intgetPriority()java.lang.Class<?>getTarget()booleanisStatic()
-
-
-
Constructor Detail
-
LambdaListener
public LambdaListener(LambdaListener.Factory factory, java.lang.Class<?> klass, java.lang.Object object, java.lang.reflect.Method method)
Creates a new lambda listener, can be used for both static and non-static methods.- Parameters:
klass- Class of the objectobject- Object, null if staticmethod- Method to create lambda for
-
-
Method Detail
-
call
public void call(java.lang.Object event)
Description copied from interface:IListenerCalls the listener with the specified event.
-
getTarget
public java.lang.Class<?> getTarget()
-
getPriority
public int getPriority()
- Specified by:
getPriorityin interfaceIListener- Returns:
- The priority for this listener
-
-