changeset 22679:152f2a7c46d8

Add missing registerOptional* methods
author Christian Wimmer <christian.wimmer@oracle.com>
date Tue, 22 Sep 2015 17:36:27 -0700
parents f3ebbebef617
children d79fcf097df7
files graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/InvocationPlugins.java
diffstat 1 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/InvocationPlugins.java	Tue Sep 22 17:35:52 2015 -0700
+++ b/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/InvocationPlugins.java	Tue Sep 22 17:36:27 2015 -0700
@@ -168,6 +168,36 @@
         }
 
         /**
+         * Registers a plugin for an optional method with no arguments.
+         *
+         * @param name the name of the method
+         * @param plugin the plugin to be registered
+         */
+        public void registerOptional0(String name, InvocationPlugin plugin) {
+            plugins.register(plugin, true, allowOverwrite, declaringClass, name);
+        }
+
+        /**
+         * Registers a plugin for an optional method with 1 argument.
+         *
+         * @param name the name of the method
+         * @param plugin the plugin to be registered
+         */
+        public void registerOptional1(String name, Class<?> arg, InvocationPlugin plugin) {
+            plugins.register(plugin, true, allowOverwrite, declaringClass, name, arg);
+        }
+
+        /**
+         * Registers a plugin for an optional method with 2 arguments.
+         *
+         * @param name the name of the method
+         * @param plugin the plugin to be registered
+         */
+        public void registerOptional2(String name, Class<?> arg1, Class<?> arg2, InvocationPlugin plugin) {
+            plugins.register(plugin, true, allowOverwrite, declaringClass, name, arg1, arg2);
+        }
+
+        /**
          * Registers a plugin for an optional method with 3 arguments.
          *
          * @param name the name of the method