Examples of fieldByName()


Examples of com.sun.jdi.ClassType.fieldByName()

                if ( rem == null ) {
                    return null;
                }
                ObjectReference obj = (ObjectReference) rem;
                ClassType frameType = (ClassType) obj.type();
                Field field = frameType.fieldByName( "sourceFile" );
                rem = obj.getValue( field );
                if ( rem == null ) {
                    return null;
                }
                StringReference res = (StringReference) rem;
View Full Code Here

Examples of com.sun.jdi.ClassType.fieldByName()

        //ObjectReference o = (ObjectReference) ((JDIObjectValue) value).getUnderlyingObject();
        if ( o == null ) {
            return null;
        }

        Field field = frameType.fieldByName( methodName );
        Value val = o.getValue( field );
        return val;
    }

    public String getSourcePath() throws DebugException {
View Full Code Here

Examples of com.sun.jdi.ClassType.fieldByName()

    // load more types via reflection
    this._Array = loadClass("java.lang.reflect.Array");
    this._URLClassLoader = loadClass("java.net.URLClassLoader");
    final ClassType _Byte = loadClass("java.lang.Byte");
    this._byte = (ClassType) ((ClassObjectReference) _Byte.getValue(_Byte.fieldByName("TYPE"))).reflectedType();

    // get an empty URL[] and use it to create an URLClassLoader
    final ArrayReference urls = buildArray(loadClass("java.net.URL"), 0);
    myClassLoader = newInstance(_URLClassLoader, "([Ljava/net/URL;)V", new Value[] { urls });
  }
View Full Code Here

Examples of com.sun.jdi.ClassType.fieldByName()

            ((StepRequest) stepRequests.get(i)).disable();
          }
          if (disableSecurityManager) {
            consoleOut.println("== Disabling security manager...");
            ClassType _System = (ClassType) vm.classesByName("java.lang.System").get(0);
            _System.setValue(_System.fieldByName("security"), null);
          }
          consoleOut.println("== Trying to inject...");
          try {
            final JDWPClassInjector ci = new JDWPClassInjector(tr);
            for (int i = 0; i < classes.length; i++) {
View Full Code Here

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

        ObjectReference thisObj = stackFrame.thisObject();
        if (thisObj == null) {
          return "can't find field or variable with name '"+name+"'";
        }
        ReferenceType refType = thisObj.referenceType();
        Field field = refType.fieldByName(name);
        thisObj.setValue(field, value);
      }
    } catch (Throwable e) {
      return e.getMessage();
    }
View Full Code Here

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

      thisObj = (ObjectReference)evalTreeNode(objNode);
      Value value = findValueInFrame(threadRef, memberName, thisObj);
      return value;
    } catch (VariableOrFieldNotFoundException e) {
      ReferenceType refType = getClassType(objNode.getText());
      Field field = refType.fieldByName(memberName);
      Value value = refType.getValue(field);
      return value;
    }
   
  }
View Full Code Here

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

     
      ReferenceType refType = stackFrame.location().declaringType();
      if (thisObj != null ) {
        refType = thisObj.referenceType();
      }
      Field field = refType.fieldByName(name);
      if (field == null ) {
        throw new VariableOrFieldNotFoundException("eval expression error, field '" + name +"' can't be found.");
      }
      if (thisObj != null) {
        value = thisObj.getValue(field);
View Full Code Here

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

     
      ReferenceType refType = stackFrame.location().declaringType();
      if (thisObj != null ) {
        refType = thisObj.referenceType();
      }
      Field field = refType.fieldByName(name);
      if (field == null ) {
        throw new ExpressionEvalException("eval expression error, field '" + name +"' can't be found.");
      }
      if (thisObj != null) {
        value = thisObj.getValue(field);
View Full Code Here

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

  }
 
  void exceptionEventDebug(ExceptionEvent exc) {
    try {
      ReferenceType rt = exc.exception().referenceType();
      Field field = rt.fieldByName("detailMessage");
      //detailMessage
      Value v = exc.exception().getValue(field);
      if(exc.catchLocation()!=null) {
        logException.debug("CaughtEx: [" + exc.location() + " | catchLoc: " + exc.catchLocation() + "] "+exc.exception().referenceType().name()+": "+v.toString());
      }
View Full Code Here

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

   * org.eclipse.jdt.debug.core.IJavaReferenceType#getField(java.lang.String)
   */
  public IJavaFieldVariable getField(String name) throws DebugException {
    try {
      ReferenceType type = (ReferenceType) getUnderlyingType();
      Field field = type.fieldByName(name);
      if (field != null && field.isStatic()) {
        return new JDIFieldVariable(getJavaDebugTarget(), field, type);
      }
    } catch (RuntimeException e) {
      targetRequestFailed(
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.