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

Examples of org.eclipse.jdt.internal.compiler.ast.TypeReference$AnnotationCollector


    boolean noProblems = true;
    int length = this.referenceContext.superInterfaces.length;
    ReferenceBinding[] interfaceBindings = new ReferenceBinding[length];
    int count = 0;
    nextInterface : for (int i = 0; i < length; i++) {
        TypeReference superInterfaceRef = this.referenceContext.superInterfaces[i];
      ReferenceBinding superInterface = findSupertype(superInterfaceRef);
      if (superInterface == null) { // detected cycle
        sourceType.tagBits |= TagBits.HierarchyHasProblems;
        noProblems = false;
        continue nextInterface;
View Full Code Here


        String[] parameterSignatures;
        if (arguments != null) {
          parameterSignatures = new String[arguments.length];
          for (int i = 0; i < arguments.length; i++) {
            Argument argument = arguments[i];
            TypeReference typeReference = argument.type;
            int arrayDim = typeReference.dimensions();

            String typeSig =
              Signature.createTypeSignature(
                  CharOperation.concatWith(
                      typeReference.getTypeName(), '.'), false);
            if (arrayDim > 0) {
              typeSig = Signature.createArraySignature(typeSig, arrayDim);
            }
            parameterSignatures[i] = typeSig;
View Full Code Here

  }

  public CastExpression convert(org.eclipse.jdt.internal.compiler.ast.CastExpression expression) {
    CastExpression castExpression = new CastExpression(this.ast);
    castExpression.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
    TypeReference type = expression.type;
    trimWhiteSpacesAndComments(type);
    castExpression.setType(convertType(type));
    castExpression.setExpression(convert(expression.expression));
    if (this.resolveBindings) {
      recordNodes(castExpression, expression);
View Full Code Here

    simpleName.internalSetIdentifier(new String(typeParameter.name));
    int start = typeParameter.sourceStart;
    int end = typeParameter.sourceEnd;
    simpleName.setSourceRange(start, end - start + 1);
    typeParameter2.setName(simpleName);
    final TypeReference superType = typeParameter.type;
    end = typeParameter.declarationSourceEnd;
    if (superType != null) {
      Type type = convertType(superType);
      typeParameter2.typeBounds().add(type);
      end = type.getStartPosition() + type.getLength() - 1;
View Full Code Here

        }
    return qualifiedName;
  }

  protected void setTypeNameForAnnotation(org.eclipse.jdt.internal.compiler.ast.Annotation compilerAnnotation, Annotation annotation) {
    TypeReference typeReference = compilerAnnotation.type;
    if (typeReference instanceof QualifiedTypeReference) {
      QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) typeReference;
      char[][] tokens = qualifiedTypeReference.tokens;
      long[] positions = qualifiedTypeReference.sourcePositions;
      // QualifiedName
View Full Code Here

      }
    }
    /*
     * Superclass
     */
    final TypeReference superclass = typeDeclaration.superclass;
    if (superclass != null) {
      Alignment superclassAlignment =this.scribe.createAlignment(
          Alignment.SUPER_CLASS,
          this.preferences.alignment_for_superclass_in_type_declaration,
          2,
          this.scribe.scanner.currentPosition);
      this.scribe.enterAlignment(superclassAlignment);
      boolean ok = false;
      do {
        try {
          this.scribe.alignFragment(superclassAlignment, 0);
          this.scribe.printNextToken(TerminalTokens.TokenNameextends, true);
          this.scribe.alignFragment(superclassAlignment, 1);
          this.scribe.space();
          superclass.traverse(this, typeDeclaration.scope);
          ok = true;
        } catch (AlignmentException e) {
          this.scribe.redoAlignment(e);
        }
      } while (!ok);
View Full Code Here

        this.scribe.printModifiers(annotationTypeMemberDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_METHOD);
    this.scribe.space();
    /*
     * Print the method return type
     */
    final TypeReference returnType = annotationTypeMemberDeclaration.returnType;
    final MethodScope annotationTypeMemberDeclarationScope = annotationTypeMemberDeclaration.scope;

    if (returnType != null) {
      returnType.traverse(this, annotationTypeMemberDeclarationScope);
    }
    /*
     * Print the method name
     */
    this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
View Full Code Here

        }

        /*
         * Print the method return type
         */
        final TypeReference returnType = methodDeclaration.returnType;
   
        if (returnType != null) {
          returnType.traverse(this, methodDeclarationScope);
        }
        this.scribe.alignFragment(methodDeclAlignment, ++fragmentIndex);

        /*
         * Print the method name
View Full Code Here

  private boolean resolveThrownTypes(TreeLogger logger, JAbstractMethod method,
      TypeReference[] jthrows) {
    if (jthrows != null) {
      for (int i = 0; i < jthrows.length; i++) {
        TypeReference jthrown = jthrows[i];
        if (!resolveThrownType(logger, method, jthrown)) {
          return false;
        }
      }
    }
View Full Code Here

        checkRefs(meth, scope);
      }
    }

    private void checkDecl(MethodDeclaration meth, ClassScope scope) {
      TypeReference returnType = meth.returnType;
      if (containsLong(returnType, scope)) {
        longAccessError(meth, "Type '" + typeString(returnType)
            + "' may not be returned from a JSNI method");
      }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ast.TypeReference$AnnotationCollector

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.