Package com.sun.jdi

Examples of com.sun.jdi.ReferenceType


   */
  protected Integer getCRC(String typeName) throws DebugException {
    if (getVM() instanceof org.eclipse.jdi.hcr.VirtualMachine) {
      List<ReferenceType> classes = jdiClassesByName(typeName);
      if (!classes.isEmpty()) {
        ReferenceType type = classes.get(0);
        if (type instanceof org.eclipse.jdi.hcr.ReferenceType) {
          try {
            org.eclipse.jdi.hcr.ReferenceType rt = (org.eclipse.jdi.hcr.ReferenceType) type;
            if (rt.isVersionKnown()) {
              return new Integer(rt.getClassFileVersion());
            }
          } catch (RuntimeException e) {
            targetRequestFailed(
                MessageFormat.format(
                    JDIDebugModelMessages.JDIDebugTarget_exception_retrieving_version_information,
                    e.toString(), type.name()), e);
            // execution will never reach this line, as
            // #targetRequestFailed will throw an exception
            return null;
          }
        }
View Full Code Here


        arguments.add(((JDIValue) arg).getUnderlyingValue());
      }
    }
    ObjectReference object = getUnderlyingObject();
    Method method = null;
    ReferenceType refType = getUnderlyingReferenceType();
    try {
      if (superSend) {
        // begin lookup in superclass
        refType = ((ClassType) refType).superclass();
      }
View Full Code Here

        arguments.add(((JDIValue) arg).getUnderlyingValue());
      }
    }
    ObjectReference object = getUnderlyingObject();
    Method method = null;
    ReferenceType refType = getUnderlyingReferenceType();
    try {
      while (typeSignature != null && refType != null  && !refType.signature().equals(typeSignature)) {
        // lookup correct type through the hierarchy
        refType = ((ClassType) refType).superclass();
        if (refType == null) {
          targetRequestFailed(
              JDIDebugModelMessages.JDIObjectValueMethod_declaring_type_not_found_1,
View Full Code Here

   * @see org.eclipse.jdt.debug.core.IJavaObject#getField(java.lang.String,
   * boolean)
   */
  public IJavaFieldVariable getField(String name, boolean superField)
      throws DebugException {
    ReferenceType ref = getUnderlyingReferenceType();
    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;
      Iterator<Field> fields = ref.fields().iterator();
      while (fields.hasNext()) {
        Field fieldTmp = fields.next();
        if (fieldTmp.name().startsWith("this$")) { //$NON-NLS-1$
          enclosingThis = fieldTmp;
          break;
View Full Code Here

   * @see org.eclipse.jdt.debug.core.IJavaObject#getField(java.lang.String,
   * java.lang.String)
   */
  public IJavaFieldVariable getField(String name,
      String declaringTypeSignature) throws DebugException {
    ReferenceType ref = getUnderlyingReferenceType();
    try {
      Field field = null;
      Field fieldTmp = null;
      Iterator<Field> fields = ref.allFields().iterator();
      while (fields.hasNext()) {
        fieldTmp = fields.next();
        if (name.equals(fieldTmp.name())
            && declaringTypeSignature.equals(fieldTmp
                .declaringType().signature())) {
View Full Code Here

   *                DebugException's status code contains the underlying
   *                exception responsible for the failure.</li>
   */
  public IJavaFieldVariable getField(String name, int superClassLevel)
      throws DebugException {
    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

   */
  public IJavaObject getEnclosingObject(int enclosingLevel)
      throws DebugException {
    JDIObjectValue res = this;
    for (int i = 0; i < enclosingLevel; i++) {
      ReferenceType ref = res.getUnderlyingReferenceType();
      try {
        Field enclosingThis = null, fieldTmp = null;
        Iterator<Field> fields = ref.fields().iterator();
        while (fields.hasNext()) {
          fieldTmp = fields.next();
          if (fieldTmp.name().startsWith("this$")) { //$NON-NLS-1$
            enclosingThis = fieldTmp;
          }
View Full Code Here

   *
   * @see org.eclipse.jdt.debug.core.IJavaVariable#getGenericSignature()
   */
  public String getGenericSignature() throws DebugException {
    try {
      ReferenceType referenceType = getArrayReference().referenceType();
      String genericSignature = referenceType.genericSignature();
      if (genericSignature != null) {
        return genericSignature;
      }
      return referenceType.signature();
    } catch (RuntimeException e) {
      targetRequestFailed(
          MessageFormat.format(
              JDIDebugModelMessages.JDIArrayEntryVariable_exception_retrieving_type_signature,
              e.toString()), e);
View Full Code Here

          JDIDebugBreakpointMessages.JavaPatternBreakpoint_0, e);
    }
    if (classes != null) {
      Iterator<ReferenceType> iter = classes.iterator();
      while (iter.hasNext()) {
        ReferenceType type = iter.next();
        if (installableReferenceType(type, target)) {
          createRequest(target, type);
        }
      }
    }
View Full Code Here

  @Override
  protected void setJDIValue(Value value) throws DebugException {
    try {
      if (isStatic()) {
        ReferenceType declaringType = getField().declaringType();
        if (declaringType instanceof InterfaceType) {
          requestFailed(JDIDebugModelMessages.JDIFieldVariable_0,
              null);
        }
        ((ClassType) declaringType).setValue(getField(), value);
View Full Code Here

TOP

Related Classes of com.sun.jdi.ReferenceType

Copyright © 2018 www.massapicom. 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.