public static class InvocationPlugins.Registration extends Object
| Modifier and Type | Field and Description |
|---|---|
private Class<?> |
declaringClass |
private InvocationPlugins |
plugins |
| Constructor and Description |
|---|
Registration(InvocationPlugins plugins,
Class<?> declaringClass)
Creates an object for registering
InvocationPlugins for methods declared by a
given class. |
| Modifier and Type | Method and Description |
|---|---|
void |
register0(String name,
InvocationPlugin plugin)
Registers a plugin for a method with no arguments.
|
void |
register1(String name,
Class<?> arg,
InvocationPlugin plugin)
Registers a plugin for a method with 1 argument.
|
void |
register2(String name,
Class<?> arg1,
Class<?> arg2,
InvocationPlugin plugin)
Registers a plugin for a method with 2 arguments.
|
void |
register3(String name,
Class<?> arg1,
Class<?> arg2,
Class<?> arg3,
InvocationPlugin plugin)
Registers a plugin for a method with 3 arguments.
|
void |
register4(String name,
Class<?> arg1,
Class<?> arg2,
Class<?> arg3,
Class<?> arg4,
InvocationPlugin plugin)
Registers a plugin for a method with 4 arguments.
|
void |
register5(String name,
Class<?> arg1,
Class<?> arg2,
Class<?> arg3,
Class<?> arg4,
Class<?> arg5,
InvocationPlugin plugin)
Registers a plugin for a method with 5 arguments.
|
void |
registerMethodSubstitution(Class<?> substituteDeclaringClass,
String name,
Class<?>... argumentTypes)
Registers a plugin that implements a method based on the bytecode of a substitute method.
|
void |
registerOptional3(String name,
Class<?> arg1,
Class<?> arg2,
Class<?> arg3,
InvocationPlugin plugin)
Registers a plugin for an optional method with 3 arguments.
|
void |
registerOptional4(String name,
Class<?> arg1,
Class<?> arg2,
Class<?> arg3,
Class<?> arg4,
InvocationPlugin plugin)
Registers a plugin for an optional method with 4 arguments.
|
private final InvocationPlugins plugins
private final Class<?> declaringClass
public Registration(InvocationPlugins plugins, Class<?> declaringClass)
InvocationPlugins for methods declared by a
given class.plugins - where to register the pluginsdeclaringClass - the class declaring the methods for which plugins will be
registered via this objectpublic void register0(String name, InvocationPlugin plugin)
name - the name of the methodplugin - the plugin to be registeredpublic void register1(String name, Class<?> arg, InvocationPlugin plugin)
name - the name of the methodplugin - the plugin to be registeredpublic void register2(String name, Class<?> arg1, Class<?> arg2, InvocationPlugin plugin)
name - the name of the methodplugin - the plugin to be registeredpublic void register3(String name, Class<?> arg1, Class<?> arg2, Class<?> arg3, InvocationPlugin plugin)
name - the name of the methodplugin - the plugin to be registeredpublic void register4(String name, Class<?> arg1, Class<?> arg2, Class<?> arg3, Class<?> arg4, InvocationPlugin plugin)
name - the name of the methodplugin - the plugin to be registeredpublic void register5(String name, Class<?> arg1, Class<?> arg2, Class<?> arg3, Class<?> arg4, Class<?> arg5, InvocationPlugin plugin)
name - the name of the methodplugin - the plugin to be registeredpublic void registerOptional3(String name, Class<?> arg1, Class<?> arg2, Class<?> arg3, InvocationPlugin plugin)
name - the name of the methodplugin - the plugin to be registeredpublic void registerOptional4(String name, Class<?> arg1, Class<?> arg2, Class<?> arg3, Class<?> arg4, InvocationPlugin plugin)
name - the name of the methodplugin - the plugin to be registeredpublic void registerMethodSubstitution(Class<?> substituteDeclaringClass, String name, Class<?>... argumentTypes)
substituteDeclaringClass - the class declaring the substitute methodname - the name of both the original and substitute methodargumentTypes - the argument types of the method. Element 0 of this array must be
the Class value for InvocationPlugin.Receiver iff the method
is non-static. Upon returning, element 0 will have been rewritten to
declaringClass