Package com.sun.jdi

Examples of com.sun.jdi.ReferenceType


  public void buildSourceStatic(IJavaReferenceType type) {
    Type underlyingType = ((JDIReferenceType) type).getUnderlyingType();
    if (!(underlyingType instanceof ReferenceType)) {
      return;
    }
    ReferenceType refType = (ReferenceType) underlyingType;
    fSource = buildTypeDeclaration(refType, buildRunMethod(refType), null,
        false);
    String packageName = getPackageName(refType.name());
    if (packageName != null) {
      fSource.insert(0, "package " + packageName + ";\n"); //$NON-NLS-1$ //$NON-NLS-2$
      fCodeSnippetPosition += 10 + packageName.length();
    }
    fCompilationUnitName = getSimpleName(refType.name());
  }
View Full Code Here


    }

    List<ReferenceType> nestedTypes = referenceType.nestedTypes();
    if (nestedTypeName == null) {
      for (Iterator<ReferenceType> iterator = nestedTypes.iterator(); iterator.hasNext();) {
        ReferenceType nestedType = iterator.next();
        if (isADirectInnerType(typeName, nestedType.name())) {
          source.append(buildTypeDeclaration(nestedType, null, null,
              true));
        }
      }
    } else {
      for (Iterator<ReferenceType> iterator = nestedTypes.iterator(); iterator.hasNext();) {
        ReferenceType nestedType = iterator.next();
        if (!nestedTypeName.equals(nestedType.name())
            && isADirectInnerType(typeName, nestedType.name())) {
          source.append(buildTypeDeclaration(nestedType, null, null,
              true));
        }
      }
    }
View Full Code Here

     * @return the class name
     */
    protected String className() {
        if (line.fileName().endsWith(".pde")) {
            // standard tab
            ReferenceType mainClass = dbg.getMainClass();
            //System.out.println(dbg.getMainClass().name());
            if (mainClass == null) {
                return null;
            }
            return dbg.getMainClass().name();
View Full Code Here

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

  public List<ClassType> implementors() {
    // Note that this information should not be cached.
    List<ClassType> implementors = new ArrayList<ClassType>();
    Iterator<ReferenceType> itr = virtualMachineImpl().allRefTypes();
    while (itr.hasNext()) {
      ReferenceType refType = itr.next();
      if (refType instanceof ClassTypeImpl) {
        try {
          ClassTypeImpl classType = (ClassTypeImpl) refType;
          List<InterfaceType> interfaces = classType.interfaces();
          if (interfaces.contains(this)) {
View Full Code Here

    // Note that this information should not be cached.
    List<InterfaceType> implementors = new ArrayList<InterfaceType>();
    Iterator<ReferenceType> itr = virtualMachineImpl().allRefTypes();
    while (itr.hasNext()) {
      try {
        ReferenceType refType = itr.next();
        if (refType instanceof InterfaceTypeImpl) {
          InterfaceTypeImpl interFaceType = (InterfaceTypeImpl) refType;
          List<InterfaceType> interfaces = interFaceType.superinterfaces();
          if (interfaces.contains(this)) {
            implementors.add(interFaceType);
View Full Code Here

   *             on failure
   */
  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)) {
          Value value = getUnderlyingThread().getValue(field);
          if (value instanceof BooleanValue) {
View Full Code Here

    }

    boolean success = false;
    Iterator<ReferenceType> iter = classes.iterator();
    while (iter.hasNext()) {
      ReferenceType type = iter.next();
      if (createRequest(target, type)) {
        success = true;
      }
    }
View Full Code Here

          throw e;
        }
      } else {
        List<Field> fields = null;
        try {
          ReferenceType refType = object.referenceType();
          fields = refType.allFields();
        } catch (ObjectCollectedException e) {
          return Collections.EMPTY_LIST;
        } catch (RuntimeException e) {
          targetRequestFailed(
              MessageFormat.format(
View Full Code Here

        // #isStatic() does not claim to throw any exceptions - so it is
        // not try/catch coded
        if (method.isStatic()) {
          // add statics
          List<Field> allFields = null;
          ReferenceType declaringType = method.declaringType();
          try {
            allFields = declaringType.allFields();
          } catch (RuntimeException e) {
            targetRequestFailed(
                MessageFormat.format(
                    JDIDebugModelMessages.JDIStackFrame_exception_retrieving_fields,
                    e.toString()), e);
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.