public class LambdaMetaFactoryGenerator extends java.lang.Object implements IGenerator
IGenerator implementation which calls the handler method using a LambdaMetafactory generated Runnable or Consumer.| Constructor and Description |
|---|
LambdaMetaFactoryGenerator()
Use the
MethodHandles.Lookup of the current ClassLoader. |
LambdaMetaFactoryGenerator(java.lang.invoke.MethodHandles.Lookup lookup) |
| Modifier and Type | Method and Description |
|---|---|
AHandler |
generate(java.lang.Class<?> owner,
java.lang.Object instance,
EventHandler annotation,
java.lang.reflect.Method method,
java.lang.Class<?> arg)
Generate an
AHandler for the given method with an event parameter. |
AHandler |
generateVirtual(java.lang.Class<?> owner,
java.lang.Object instance,
EventHandler annotation,
java.lang.reflect.Method method)
Generate an
AHandler for the given method without an event parameter. |
public LambdaMetaFactoryGenerator()
MethodHandles.Lookup of the current ClassLoader.public LambdaMetaFactoryGenerator(@Nonnull
java.lang.invoke.MethodHandles.Lookup lookup)
lookup - The MethodHandles.Lookup to use@Nonnull public AHandler generate(java.lang.Class<?> owner, @Nullable java.lang.Object instance, EventHandler annotation, java.lang.reflect.Method method, java.lang.Class<?> arg)
IGeneratorAHandler for the given method with an event parameter.generate in interface IGeneratorowner - The owner of the handler methodinstance - The instance of the handler ownerannotation - The EventHandler annotation of the handler methodmethod - The handler methodarg - The event class@Nonnull public AHandler generateVirtual(java.lang.Class<?> owner, @Nullable java.lang.Object instance, EventHandler annotation, java.lang.reflect.Method method)
IGeneratorAHandler for the given method without an event parameter.generateVirtual in interface IGeneratorowner - The owner of the handler methodinstance - The instance of the handler ownerannotation - The EventHandler annotation of the handler methodmethod - The handler method