Package com.sun.jdi

Examples of com.sun.jdi.Type


      return false;
    }
    Iterator typeIter = argTypes.iterator();
    Iterator valIter = arguments.iterator();
    while (typeIter.hasNext()) {
      Type argType = (Type) typeIter.next();
      Value value = (Value) valIter.next();
      if (value == null) {
        if (isPrimitiveType(argType.name()))
          return false;
      }
      if (!value.type().equals(argType)) {
        if (isAssignableTo(value.type(), argType)) {
          return true;
View Full Code Here


  }

  static boolean isArrayAssignableTo(ArrayType fromType, Type toType) {
    if (toType instanceof ArrayType) {
      try {
        Type toComponentType = ((ArrayType) toType).componentType();
        return isComponentAssignable(fromType.componentType(),
            toComponentType);
      } catch (ClassNotLoadedException e) {
        return false;
      }
View Full Code Here

      return false;
    }
    Iterator typeIter = argTypes.iterator();
    Iterator valIter = arguments.iterator();
    while (typeIter.hasNext()) {
      Type argType = (Type) typeIter.next();
      Value value = (Value) valIter.next();
      if (value == null) {
        if (isPrimitiveType(argType.name()))
          return false;
      }
      if (!value.type().equals(argType)) {
        if (isAssignableTo(value.type(), argType)) {
          return true;
View Full Code Here

  }

  static boolean isArrayAssignableTo(ArrayType fromType, Type toType) {
    if (toType instanceof ArrayType) {
      try {
        Type toComponentType = ((ArrayType) toType).componentType();
        return isComponentAssignable(fromType.componentType(),
            toComponentType);
      } catch (ClassNotLoadedException e) {
        return false;
      }
View Full Code Here

      String genericSignature = getLocal().genericSignature();
      if (genericSignature != null) {
        return JDIReferenceType.getTypeName(genericSignature);
      }
      try {
        Type underlyingType = getUnderlyingType();
        if (underlyingType instanceof ReferenceType) {
          return JDIReferenceType
              .getGenericName((ReferenceType) underlyingType);
        }
      } catch (DebugException e) {
View Full Code Here

  static public String getGenericName(ReferenceType type)
      throws DebugException {
    if (type instanceof ArrayType) {
      try {
        Type componentType;
        componentType = ((ArrayType) type).componentType();
        if (componentType instanceof ReferenceType) {
          return getGenericName((ReferenceType) componentType) + "[]"; //$NON-NLS-1$
        }
        return type.name();
View Full Code Here

   * @see org.eclipse.jdt.debug.core.IJavaReferenceType#getInstanceCount()
   */
  public long getInstanceCount() throws DebugException {
    JDIDebugTarget target = getJavaDebugTarget();
    if (target.supportsInstanceRetrieval()) {
      Type type = getUnderlyingType();
      if(type instanceof ReferenceType) {
        ArrayList<ReferenceType> list = new ArrayList<ReferenceType>(2);
        list.add((ReferenceType) type);
        VirtualMachine vm = getVM();
        try {
View Full Code Here

  /**
   * Build source for a class type (static context)
   */
  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,
View Full Code Here

   * @see org.eclipse.jdt.debug.core.IJavaValue#getGenericSignature()
   */
  public String getGenericSignature() throws DebugException {
    try {
      if (fValue != null) {
        Type type = fValue.type();
        if (type instanceof ReferenceType) {
          return ((ReferenceType) type).genericSignature();
        }
        return null;
      }
View Full Code Here

    List<Value> result = new ArrayList<Value>(values.size());
    Iterator<? extends Value> iterValues = values.iterator();
    Iterator<Type> iterTypes = types.iterator();
    while (iterValues.hasNext()) {
      Value value = iterValues.next();
      Type type = iterTypes.next();
      result.add(checkValue(value, type, vm));
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of com.sun.jdi.Type

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.