This one just takes a Method object as an argument since that is what it wants anyway. It puts the responsibility on the programmer to get the Method. I figured that since on both the client and the server side I know what object I'm using to serialize and de-serialize the object, I can get to the method directly.
public MethodTarget(Object targetObject, Method aMethod)
throws NoSuchMethodException
{
this.targetObject = targetObject;
targetMethod = aMethod;
}
This one is a little different. It still takes a string as an argument, but since I left the original constructor there I had to change the order of the arguments. The String argument methodToString is supposed to be the string that is in the same format as the string that is returned from sending the methodToString method to an instance of a Method (myMethod.methodToString()).
public MethodTarget(String methodToString, Object targetObject)
throws NoSuchMethodException
{
this.targetObject = targetObject;
Class cls = targetObject.getClass();
int i = 0;
if (targetMethod != null) targetMethod = null;
while (i < methods.length) {
}
}
Again, this is just a hack. I don't know what requirements constrain the possible solutions, this is just what I did to make it work for me.
Lawrence Livermore National Laboratory
[EMAIL PROTECTED]
work: 925.422.0473
Stick that in your compiler and de-bug it!