public class InvocationPlugins extends Object
InvocationPlugins.| Modifier and Type | Class and Description |
|---|---|
private static class |
InvocationPlugins.Checker |
static class |
InvocationPlugins.InvocationPluginReceiver |
static class |
InvocationPlugins.Registration
Utility for
registration of invocation plugins.
|
| Modifier and Type | Field and Description |
|---|---|
protected InvocationPlugins |
parent
The plugins searched before searching in
this object.
|
protected MethodIdMap<InvocationPlugin> |
plugins |
| Modifier | Constructor and Description |
|---|---|
|
InvocationPlugins(InvocationPlugins parent)
Creates a set of invocation plugins with a non-null parent.
|
private |
InvocationPlugins(InvocationPlugins parent,
MetaAccessProvider metaAccess) |
|
InvocationPlugins(MetaAccessProvider metaAccess) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkNewNodes(GraphBuilderContext b,
InvocationPlugin plugin,
NodeIterable<Node> newNodes)
Checks a set of nodes added to the graph by an
InvocationPlugin. |
void |
closeRegistration()
Disallows new registrations of new plugins, and creates the internal tables for method
lookup.
|
InvocationPlugins |
getParent()
Gets the invocation plugins searched
before searching in this object.
|
InvocationPlugin |
lookupInvocation(ResolvedJavaMethod method)
Gets the plugin for a given method.
|
private void |
register(InvocationPlugin plugin,
boolean isOptional,
Class<?> declaringClass,
String name,
Class<?>... argumentTypes) |
void |
register(InvocationPlugin plugin,
Class<?> declaringClass,
String name,
Class<?>... argumentTypes)
Registers an invocation plugin for a given method.
|
void |
registerOptional(InvocationPlugin plugin,
Class<?> declaringClass,
String name,
Class<?>... argumentTypes)
Registers an invocation plugin for a given, optional method.
|
int |
size() |
String |
toString() |
protected final MethodIdMap<InvocationPlugin> plugins
protected final InvocationPlugins parent
private InvocationPlugins(InvocationPlugins parent, MetaAccessProvider metaAccess)
public InvocationPlugins(InvocationPlugins parent)
public InvocationPlugins(MetaAccessProvider metaAccess)
private void register(InvocationPlugin plugin, boolean isOptional, Class<?> declaringClass, String name, Class<?>... argumentTypes)
public void register(InvocationPlugin plugin, Class<?> declaringClass, String name, Class<?>... argumentTypes)
method.argumentTypes - 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
declaringClasspublic void registerOptional(InvocationPlugin plugin, Class<?> declaringClass, String name, Class<?>... argumentTypes)
method.argumentTypes - 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
declaringClasspublic InvocationPlugin lookupInvocation(ResolvedJavaMethod method)
method - the method to lookupmethod or null if none existspublic void closeRegistration()
public InvocationPlugins getParent()
public int size()
public void checkNewNodes(GraphBuilderContext b, InvocationPlugin plugin, NodeIterable<Node> newNodes)
InvocationPlugin.b - the graph builder that applied the pluginplugin - a plugin that was just appliednewNodes - the nodes added to the graph by pluginAssertionError - if any check fail