Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.WildcardType


      case ASTNode.SIMPLE_TYPE:
        buffer.append(((SimpleType) type).getName().getFullyQualifiedName());
        break;
      case ASTNode.WILDCARD_TYPE:
        buffer.append('?');
        WildcardType wildcardType = (WildcardType) type;
        Type bound = wildcardType.getBound();
        if (bound == null) return;
        if (wildcardType.isUpperBound()) {
          buffer.append(" extends "); //$NON-NLS-1$
        } else {
          buffer.append(" super "); //$NON-NLS-1$
        }
        getFullyQualifiedName(bound, buffer);
View Full Code Here


    if (type.isSimpleType()) {
      SimpleType simpleType = (SimpleType)type;
      return simpleType.getName().getFullyQualifiedName();
    }
    if (type.isWildcardType()) {
      WildcardType wildcardType = (WildcardType)type;
      Type boundType = wildcardType.getBound();
      if (boundType != null) {
        if (wildcardType.isUpperBound()) {
          return "? extends " + asString(boundType);
        } else {
          return "? super " + asString(boundType);
        }
      } else {
View Full Code Here

            LOGGER.debug("Qualified type created at '{0}'", typeNode.getPath());
        } else if (type.isWildcardType()) {
            final Node typeNode = parentNode.addNode("?", ClassFileSequencerLexicon.WILDCARD_TYPE);
            typeNode.setProperty(ClassFileSequencerLexicon.TYPE_CLASS_NAME, getTypeName(type));

            final WildcardType wildcardType = (WildcardType)type;
            final String bound = wildcardType.isUpperBound() ? ClassFileSequencerLexicon.WildcardTypeBound.UPPER.toString() : ClassFileSequencerLexicon.WildcardTypeBound.LOWER.toString();
            typeNode.setProperty(ClassFileSequencerLexicon.BOUND_TYPE, bound);

            if (wildcardType.getBound() != null) {
                record(wildcardType.getBound(), ClassFileSequencerLexicon.BOUND, typeNode);
            }

            LOGGER.debug("Wildcard type created at '{0}'", typeNode.getPath());
        } else {
            assert false;
View Full Code Here

      case ASTNode.SIMPLE_TYPE:
        buffer.append(((SimpleType) type).getName().getFullyQualifiedName());
        break;
      case ASTNode.WILDCARD_TYPE:
        buffer.append('?');
        WildcardType wildcardType = (WildcardType) type;
        Type bound = wildcardType.getBound();
        if (bound == null) return;
        if (wildcardType.isUpperBound()) {
          buffer.append(" extends "); //$NON-NLS-1$
        } else {
          buffer.append(" super "); //$NON-NLS-1$
        }
        getFullyQualifiedName(bound, buffer);
View Full Code Here

      case ASTNode.SIMPLE_TYPE:
        buffer.append(((SimpleType) type).getName().getFullyQualifiedName());
        break;
      case ASTNode.WILDCARD_TYPE:
        buffer.append('?');
        WildcardType wildcardType = (WildcardType) type;
        Type bound = wildcardType.getBound();
        if (bound == null) return;
        if (wildcardType.isUpperBound()) {
          buffer.append(" extends "); //$NON-NLS-1$
        } else {
          buffer.append(" super "); //$NON-NLS-1$
        }
        getFullyQualifiedName(bound, buffer);
View Full Code Here

        }
        buff.append('>');
      }
      return buff.toString();
    } else if (type.isWildcardType()) {
      WildcardType wildcardType = (WildcardType) type;
      StringBuffer buff = new StringBuffer("?"); //$NON-NLS-1$
      Type bound = wildcardType.getBound();
      if (bound != null) {
        buff.append(wildcardType.isUpperBound() ? " extends " : " super "); //$NON-NLS-1$ //$NON-NLS-2$
        buff.append(getTypeName(bound));
      }
      return buff.toString();
    }
    return null;
View Full Code Here

    }
    else if (type.isSimpleType()) {
      result.append(((SimpleType) type).getName().getFullyQualifiedName());
    }
    else if (type.isWildcardType()) {
      WildcardType wType = (WildcardType) type;
      result.append("? ");
      if (wType.isUpperBound()) {
        result.append("extends ");
      }
      else {
        result.append("super ");
      }
      result.append(getTypeName(wType.getBound()));
    }

    return result.toString();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.WildcardType

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.