Package com.sun.jdi

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


      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

     
      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

     
      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

  }
 
  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

   * 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

   */
  protected void determineIfDaemonThread() throws DebugException {
    fIsDaemon = false;
    try {
      ReferenceType referenceType = getUnderlyingThread().referenceType();
      Field field = referenceType.fieldByName("daemon"); //$NON-NLS-1$
      if (field == null) {
        field = referenceType.fieldByName("isDaemon"); //$NON-NLS-1$
      }
      if (field != null) {
        if (field.signature().equals(Signature.SIG_BOOLEAN)) {
View Full Code Here

    fIsDaemon = false;
    try {
      ReferenceType referenceType = getUnderlyingThread().referenceType();
      Field field = referenceType.fieldByName("daemon"); //$NON-NLS-1$
      if (field == null) {
        field = referenceType.fieldByName("isDaemon"); //$NON-NLS-1$
      }
      if (field != null) {
        if (field.signature().equals(Signature.SIG_BOOLEAN)) {
          Value value = getUnderlyingThread().getValue(field);
          if (value instanceof BooleanValue) {
View Full Code Here

    try {
      if (superField) {
        // begin lookup in superclass
        ref = ((ClassType) ref).superclass();
      }
      Field field = ref.fieldByName(name);
      if (field != null) {
        return new JDIFieldVariable((JDIDebugTarget) getDebugTarget(),
            field, getUnderlyingObject(), fLogicalParent);
      }
      Field enclosingThis = null;
View Full Code Here

    ReferenceType ref = getUnderlyingReferenceType();
    try {
      for (int i = 0; i < superClassLevel; i++) {
        ref = ((ClassType) ref).superclass();
      }
      Field field = ref.fieldByName(name);
      if (field != null) {
        return new JDIFieldVariable((JDIDebugTarget) getDebugTarget(),
            field, getUnderlyingObject(), fLogicalParent);
      }
    } catch (RuntimeException e) {
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.