System.out.println("ptypeslen = " + ptypes.length); System.out.println("ptypes = " + ptypes); System.out.println("ctor = " + ctors[i].getName()); for (int j=0; j < ptypes.length; j++) { System.out.println("param = " + ptypes[i].getName());  }
  final Object doExecute() throws Exception  {    Class klazz = (target instanceof Class)	? (Class) target : target.getClass();    Object args[] = (arguments == null) ? new Object[0] : arguments;    Class argTypes[] = new Class[args.length];    for (int i = 0; i < args.length; i++)      argTypes[i] = args[i].getClass();    if (target.getClass().isArray())      {	// FIXME: invoke may have to be used.  For now, cast to Number	// and hope for the best.  If caller didn't behave, we go boom	// and throw the exception.	if (methodName.equals("get") && argTypes.length == 1)	  return Array.get(target, ((Number)args[0]).intValue());	if (methodName.equals("set") && argTypes.length == 2)	  {	    Object obj = Array.get(target, ((Number)args[0]).intValue());	    Array.set(target, ((Number)args[0]).intValue(), args[1]);	    return obj;	  }	throw new NoSuchMethodException("No matching method for statement " + toString());      }    // If we already cached the method, just use it.    if (method != null)      return method.invoke(target, args);    else if (ctor != null)      return ctor.newInstance(args);    // Find a matching method to call.  JDK seems to go through all    // this to find the method to call.    // if method name or length don't match, skip    // Need to go through each arg    // If arg is wrapper - check if method arg is matchable builtin    //  or same type or super    //  - check that method arg is same or super    if (methodName.equals("new") && target instanceof Class)      {	Constructor ctors[] = klazz.getConstructors();	for (int i = 0; i < ctors.length; i++)	  {	    // Skip methods with wrong number of args.	    Class ptypes[] = ctors[i].getParameterTypes();	    System.out.println("ptypeslen = " + ptypes.length);	    System.out.println("ptypes = " + ptypes);	    System.out.println("ctor = " + ctors[i].getName());	    for (int j=0; j < ptypes.length; j++) {	      System.out.println("param = " + ptypes[i].getName());     	    }	      	    	    if (ptypes.length != args.length)	      continue;	    // Check if method matches	    if (!compatible(ptypes, argTypes))	      continue;	    // Use method[i] if it is more specific. 	    // FIXME: should this check both directions and throw if	    // neither is more specific?	    if (ctor == null)	      {		ctor = ctors[i];		continue;	      }	    Class mptypes[] = ctor.getParameterTypes();	    if (moreSpecific(ptypes, mptypes))	      ctor = ctors[i];	  }	if (ctor == null)	  throw new InstantiationException("No matching constructor for statement " + toString());	return ctor.newInstance(args);      }    Method methods[] = klazz.getMethods();    for (int i = 0; i < methods.length; i++)      {	// Skip methods with wrong name or number of args.	if (!methods[i].getName().equals(methodName))	  continue;	Class ptypes[] = methods[i].getParameterTypes();	if (ptypes.length != args.length)	  continue;	// Check if method matches	if (!compatible(ptypes, argTypes))	  continue;	// Use method[i] if it is more specific. 	// FIXME: should this check both directions and throw if	// neither is more specific?	if (method == null)	  {	    method = methods[i];	    continue;	  }	Class mptypes[] = method.getParameterTypes();	if (moreSpecific(ptypes, mptypes))	  method = methods[i];      }    if (method == null)      throw new NoSuchMethodException("No matching method for statement " + toString());    return method.invoke(target, args);  }