[jboss-cvs] JBossCache/src/org/jboss/cache/marshall ...
Manik Surtani
manik at jboss.org
Fri Jun 8 11:52:15 EDT 2007
User: msurtani
Date: 07/06/08 11:52:15
Modified: src/org/jboss/cache/marshall MethodCall.java
MethodCallFactory.java
Log:
Protected ctor for MethodCall, vararg ctors
Revision Changes Path
1.5 +4 -9 JBossCache/src/org/jboss/cache/marshall/MethodCall.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MethodCall.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/marshall/MethodCall.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- MethodCall.java 27 Feb 2007 21:57:35 -0000 1.4
+++ MethodCall.java 8 Jun 2007 15:52:15 -0000 1.5
@@ -32,17 +32,12 @@
private int methodIdInteger = -1;
- public MethodCall()
- {
- super();
- }
-
- public MethodCall(Method method, Object[] arguments)
+ protected MethodCall(Method method, Object... arguments)
{
super(method, arguments);
}
- public MethodCall(Method method, Object[] arguments, int methodIdInteger)
+ protected MethodCall(Method method, int methodIdInteger, Object... arguments)
{
super(method, arguments);
this.methodIdInteger = methodIdInteger;
1.6 +15 -3 JBossCache/src/org/jboss/cache/marshall/MethodCallFactory.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MethodCallFactory.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/marshall/MethodCallFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- MethodCallFactory.java 30 Aug 2006 17:08:18 -0000 1.5
+++ MethodCallFactory.java 8 Jun 2007 15:52:15 -0000 1.6
@@ -12,7 +12,7 @@
* Factory class to create instances of org.jboss.cache.marshall.MethodCall
*
* @author <a href="galder.zamarreno at jboss.com">Galder Zamarreno</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class MethodCallFactory
{
@@ -23,8 +23,20 @@
* @param arguments list of parameters
* @return a new instance of MethodCall with the method id initialised
*/
- public static MethodCall create(Method method, Object ... arguments)
+ public static MethodCall create(Method method, Object... arguments)
{
- return new MethodCall(method, arguments, MethodDeclarations.lookupMethodId(method));
+ return new MethodCall(method, MethodDeclarations.lookupMethodId(method), arguments);
+ }
+
+ /**
+ * Creates and initialised an instance of MethodCall
+ *
+ * @param method Method instance of the MethodCall
+ * @param arguments list of parameters
+ * @return a new instance of MethodCall with the method id set to -1 (uninitialized).
+ */
+ public static MethodCall createWithNullId(Method method, Object... arguments)
+ {
+ return new MethodCall(method, arguments);
}
}
More information about the jboss-cvs-commits
mailing list