Package org.eclipse.jdt.internal.compiler.ast

Examples of org.eclipse.jdt.internal.compiler.ast.Wildcard


            nameStarted = true;
          }
          break;
        case Signature.C_STAR:
          this.namePos++;
          Wildcard result = new Wildcard(Wildcard.UNBOUND);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case Signature.C_EXTENDS:
          this.namePos++;
          result = new Wildcard(Wildcard.EXTENDS);
          result.bound = decodeType(typeSignature, length, start, end);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case Signature.C_SUPER:
          this.namePos++;
          result = new Wildcard(Wildcard.SUPER);
          result.bound = decodeType(typeSignature, length, start, end);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case Signature.C_ARRAY :
View Full Code Here


                  if (typeName[this.namePos+ahead] != TypeConstants.WILDCARD_SUPER[ahead+1]) {
                    break checkSuper;
                  }
                }
                this.namePos += max;
                Wildcard result = new Wildcard(Wildcard.SUPER);
                result.bound = decodeType(typeName, length, start, end);
                result.sourceStart = start;
                result.sourceEnd = end;
                return result;
              }
              break;
            case 'e' :
              checkExtends: {
                int max = TypeConstants.WILDCARD_EXTENDS.length-1;
                for (int ahead = 1; ahead < max; ahead++) {
                  if (typeName[this.namePos+ahead] != TypeConstants.WILDCARD_EXTENDS[ahead+1]) {
                    break checkExtends;
                  }
                }
                this.namePos += max;
                Wildcard result = new Wildcard(Wildcard.EXTENDS);
                result.bound = decodeType(typeName, length, start, end);
                result.sourceStart = start;
                result.sourceEnd = end;
                return result;
              }
              break;
          }
          Wildcard result = new Wildcard(Wildcard.UNBOUND);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case '[' :
          if (dim == 0) nameFragmentEnd = this.namePos-1;
View Full Code Here

    return variableDeclarationStatement;
  }

  public Type convertType(TypeReference typeReference) {
    if (typeReference instanceof Wildcard) {
      final Wildcard wildcard = (Wildcard) typeReference;
      final WildcardType wildcardType = new WildcardType(this.ast);
      if (wildcard.bound != null) {
        final Type bound = convertType(wildcard.bound);
        wildcardType.setBound(bound, wildcard.kind == Wildcard.EXTENDS);
        int start = wildcard.sourceStart;
View Full Code Here

    HelpInfo info = new HelpInfo() {
    };

    // Pick an Expression subtype to pass in
    GWTProblem.recordError(new Wildcard(Wildcard.EXTENDS), cud, errorMessage,
        info);

    CategorizedProblem[] errors = compilationResult.getErrors();
    assertEquals(1, errors.length);
    GWTProblem problem = (GWTProblem) errors[0];
View Full Code Here

  }

  public Type convertType(TypeReference typeReference) {
    org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations;
    if (typeReference instanceof Wildcard) {
      final Wildcard wildcard = (Wildcard) typeReference;
      final WildcardType wildcardType = new WildcardType(this.ast);
      if (wildcard.bound != null) {
        final Type bound = convertType(wildcard.bound);
        wildcardType.setBound(bound, wildcard.kind == Wildcard.EXTENDS);
        int start = wildcard.sourceStart;
View Full Code Here

            nameStarted = true;
          }
          break;
        case Signature.C_STAR:
          this.namePos++;
          Wildcard result = new Wildcard(Wildcard.UNBOUND);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case Signature.C_EXTENDS:
          this.namePos++;
          result = new Wildcard(Wildcard.EXTENDS);
          result.bound = decodeType(typeSignature, length, start, end);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case Signature.C_SUPER:
          this.namePos++;
          result = new Wildcard(Wildcard.SUPER);
          result.bound = decodeType(typeSignature, length, start, end);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case Signature.C_ARRAY :
View Full Code Here

                  if (typeName[this.namePos+ahead] != TypeConstants.WILDCARD_SUPER[ahead+1]) {
                    break checkSuper;
                  }
                }
                this.namePos += max;
                Wildcard result = new Wildcard(Wildcard.SUPER);
                result.bound = decodeType(typeName, length, start, end);
                result.sourceStart = start;
                result.sourceEnd = end;
                return result;
              }
              break;
            case 'e' :
              checkExtends: {
                int max = TypeConstants.WILDCARD_EXTENDS.length-1;
                for (int ahead = 1; ahead < max; ahead++) {
                  if (typeName[this.namePos+ahead] != TypeConstants.WILDCARD_EXTENDS[ahead+1]) {
                    break checkExtends;
                  }
                }
                this.namePos += max;
                Wildcard result = new Wildcard(Wildcard.EXTENDS);
                result.bound = decodeType(typeName, length, start, end);
                result.sourceStart = start;
                result.sourceEnd = end;
                return result;
              }
              break;
          }
          Wildcard result = new Wildcard(Wildcard.UNBOUND);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case '[' :
          if (dim == 0) nameFragmentEnd = this.namePos-1;
View Full Code Here

            nameStarted = true;
          }
          break;
        case Signature.C_STAR:
          this.namePos++;
          Wildcard result = new Wildcard(Wildcard.UNBOUND);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case Signature.C_EXTENDS:
          this.namePos++;
          result = new Wildcard(Wildcard.EXTENDS);
          result.bound = decodeType(typeSignature, length, start, end);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case Signature.C_SUPER:
          this.namePos++;
          result = new Wildcard(Wildcard.SUPER);
          result.bound = decodeType(typeSignature, length, start, end);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case Signature.C_ARRAY :
View Full Code Here

                  if (typeName[this.namePos+ahead] != TypeConstants.WILDCARD_SUPER[ahead+1]) {
                    break checkSuper;
                  }
                }
                this.namePos += max;
                Wildcard result = new Wildcard(Wildcard.SUPER);
                result.bound = decodeType(typeName, length, start, end, includeGenericsAnyway);
                result.sourceStart = start;
                result.sourceEnd = end;
                return result;
              }
              break;
            case 'e' :
              checkExtends: {
                int max = TypeConstants.WILDCARD_EXTENDS.length-1;
                for (int ahead = 1; ahead < max; ahead++) {
                  if (typeName[this.namePos+ahead] != TypeConstants.WILDCARD_EXTENDS[ahead+1]) {
                    break checkExtends;
                  }
                }
                this.namePos += max;
                Wildcard result = new Wildcard(Wildcard.EXTENDS);
                result.bound = decodeType(typeName, length, start, end, includeGenericsAnyway);
                result.sourceStart = start;
                result.sourceEnd = end;
                return result;
              }
              break;
          }
          Wildcard result = new Wildcard(Wildcard.UNBOUND);
          result.sourceStart = start;
          result.sourceEnd = end;
          return result;
        case '[' :
          if (dim == 0 && nameFragmentEnd < 0) nameFragmentEnd = this.namePos-1;
View Full Code Here

    return variableDeclarationStatement;
  }

  public Type convertType(TypeReference typeReference) {
    if (typeReference instanceof Wildcard) {
      final Wildcard wildcard = (Wildcard) typeReference;
      final WildcardType wildcardType = new WildcardType(this.ast);
      if (wildcard.bound != null) {
        final Type bound = convertType(wildcard.bound);
        wildcardType.setBound(bound, wildcard.kind == Wildcard.EXTENDS);
        int start = wildcard.sourceStart;
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ast.Wildcard

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.