Package com.sun.jdi

Examples of com.sun.jdi.ReferenceType.methodsByName()


            logError( e1 );
            return;
        }

        ReferenceType refType = debugHandlerClass;
        Method m = (Method) refType.methodsByName( "registerBreakpoint" ).iterator().next();
        List<Value> args = new ArrayList<Value>();
        IntegerValue lineVal = getVM().mirrorOf( line );
        StringReference nameVal = getVM().mirrorOf( sourceName );
        JDIObjectValue val = (JDIObjectValue) newValue( sourceName );
        ObjectReference realVal = val.getUnderlyingObject();
View Full Code Here


            logError( e1 );
            return;
        }

        ReferenceType refType = debugHandlerClass;
        Method m = (Method) refType.methodsByName( "removeBreakpoint" ).iterator().next();
        List<Value> args = new ArrayList<Value>();
        IntegerValue lineVal = getVM().mirrorOf( line );
        StringReference nameVal = getVM().mirrorOf( sourceName );
        JDIObjectValue val = (JDIObjectValue) newValue( sourceName );
        ObjectReference realVal = val.getUnderlyingObject();
View Full Code Here

        Object debugHandlerClass = handleriter.next();

        int line = step_over;

        ReferenceType refType = (ReferenceType) debugHandlerClass;
        Method m = (Method) refType.methodsByName( "setOnBreakReturn" ).iterator().next();
        List<IntegerValue> args = new ArrayList<IntegerValue>();
        IntegerValue lineVal = getVM().mirrorOf( line );
        //ObjectReference realVal = val.getUnderlyingObject();
        args.add( lineVal );
View Full Code Here

  private void installHaltPoint(VirtualMachine vm) {
    List<ReferenceType> targetClasses = vm
        .classesByName(VMLocalTarget.class.getName());
    ReferenceType classRef = targetClasses.get(0);
    Method meth = classRef.methodsByName("haltPoint").get(0);
    BreakpointRequest req = vm.eventRequestManager()
        .createBreakpointRequest(meth.location());
    req.setSuspendPolicy(BreakpointRequest.SUSPEND_EVENT_THREAD);
    req.enable();
  }
View Full Code Here

  protected Method getMethod(Class<?> class1, String methodName) {
    List<ReferenceType> targetClasses = vm()
        .classesByName(class1.getName());
    ReferenceType classRef = targetClasses.get(0);
    return classRef.methodsByName(methodName).get(0);
  }

  public Value invokeMethod(ObjectReference receiver, String methodName,
      Value... arguments) throws Throwable {
    Method method = receiver.referenceType().methodsByName(methodName)
View Full Code Here

        Object debugHandlerClass = handleriter.next();

        int line = step_over;

        ReferenceType refType = (ReferenceType) debugHandlerClass;
        Method m = (Method) refType.methodsByName( "setOnBreakReturn" ).iterator().next();
        List args = new ArrayList();
        IntegerValue lineVal = getVM().mirrorOf( line );
        //ObjectReference realVal = val.getUnderlyingObject();
        args.add( lineVal );
View Full Code Here

            logError( e1 );
            return;
        }

        ReferenceType refType = (ReferenceType) debugHandlerClass;
        Method m = (Method) refType.methodsByName( "registerBreakpoint" ).iterator().next();
        List args = new ArrayList();
        IntegerValue lineVal = getVM().mirrorOf( line );
        StringReference nameVal = getVM().mirrorOf( sourceName );
        JDIObjectValue val = (JDIObjectValue) newValue( sourceName );
        ObjectReference realVal = val.getUnderlyingObject();
View Full Code Here

            logError( e1 );
            return;
        }

        ReferenceType refType = (ReferenceType) debugHandlerClass;
        Method m = (Method) refType.methodsByName( "removeBreakpoint" ).iterator().next();
        List args = new ArrayList();
        IntegerValue lineVal = getVM().mirrorOf( line );
        StringReference nameVal = getVM().mirrorOf( sourceName );
        JDIObjectValue val = (JDIObjectValue) newValue( sourceName );
        ObjectReference realVal = val.getUnderlyingObject();
View Full Code Here

  }
 
  //XXX: cache of Method by RT+methodNameString 
  Value simpleInvokeVMMethod(ThreadReference thr, ObjectReference or, String method) throws InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException, InvocationException, NoSuchMethodException {
    ReferenceType ort = or.referenceType();
      List<Method> methods = ort.methodsByName(method);
      if(methods.size()<=0) {
        throw new NoSuchMethodException("No '"+method+"' method on remote class '"+ort.name()+"'");
        //logClazz.warn("No '"+method+"' method on remote class '"+ort.name()+"'");
        //return null;
      }
View Full Code Here

                        argTypeNames = params[1].split(",");
                    } else {
                        argTypeNames = new String[0];
                    }
                    // Get all methods of the class
                    List<Method> methodList = classType.methodsByName(params[0]);
                    Method matchedMethod = null;
                    /*
                     * As the jdb command argument doesn't supply the result
                     * value type, it's impossible to generate a jni signature
                     * for the specified method. I just have to search...
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.