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

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


      this.memberTypes[this.memberTypeCount - 1].typeDeclaration.bodyEnd =  bodyEndValue;
    }
   
    int updatedCount = 0;
    for (int i = 0; i < this.memberTypeCount; i++){
      TypeDeclaration updatedTypeDeclaration = this.memberTypes[i].updatedTypeDeclaration(depth + 1, knownTypes);
      if (updatedTypeDeclaration != null) {
        memberTypeDeclarations[existingCount + (updatedCount++)] = updatedTypeDeclaration;
      }
    }
    if (updatedCount < this.memberTypeCount) {
View Full Code Here


            canConsume = false;
          }
        }
      }
      if(canConsume) {
        TypeDeclaration typeDecl = (TypeDeclaration)parser.astStack[parser.astPtr];
        System.arraycopy(parser.genericsStack, genericsPtr - length + 1, typeDecl.typeParameters = new TypeParameter[length], 0, length);
        typeDecl.bodyStart = typeDecl.typeParameters[length-1].declarationSourceEnd + 1;
        parser.listTypeParameterLength = 0;
        parser.lastCheckPoint = typeDecl.bodyStart;
      }
View Full Code Here

    classFile.addDefaultAbstractMethods();
  }
  // propagate generation of (problem) member types
  if (typeDeclaration.memberTypes != null) {
    for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
      TypeDeclaration memberType = typeDeclaration.memberTypes[i];
      if (memberType.binding != null) {
        ClassFile.createProblemType(memberType, unitResult);
      }
    }
  }
View Full Code Here

    }

    // propagate generation of (problem) member types
    if (typeDeclaration.memberTypes != null) {
      for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
        TypeDeclaration memberType = typeDeclaration.memberTypes[i];
        if (memberType.binding != null) {
          ClassFile.createProblemType(memberType, unitResult);
        }
      }
    }
View Full Code Here

        && !this.referenceBinding.isMemberType()) {
      // add enclosing method attribute (1.5 mode only)
      attributesNumber += generateEnclosingMethodAttribute();
    }
    if (this.targetJDK >= ClassFileConstants.JDK1_4) {
      TypeDeclaration typeDeclaration = this.referenceBinding.scope.referenceContext;
      if (typeDeclaration != null) {
        final Annotation[] annotations = typeDeclaration.annotations;
        if (annotations != null) {
          attributesNumber += generateRuntimeAnnotations(annotations);
        }
View Full Code Here

          this.constantPool.literalIndex(
            ((StringConstant) fieldConstant).stringValue());
        if (stringValueIndex == -1) {
          if (!this.creatingProblemType) {
            // report an error and abort: will lead to a problem type classfile creation
            TypeDeclaration typeDeclaration = this.referenceBinding.scope.referenceContext;
            FieldDeclaration[] fieldDecls = typeDeclaration.fields;
            int max = fieldDecls == null ? 0 : fieldDecls.length;
            for (int i = 0; i < max; i++) {
              if (fieldDecls[i].binding == fieldBinding) {
                // problem should abort
View Full Code Here

        int stringValueIndex =
          this.constantPool.literalIndex(((StringConstant) constant).stringValue().toCharArray());
        if (stringValueIndex == -1) {
          if (!this.creatingProblemType) {
            // report an error and abort: will lead to a problem type classfile creation
            TypeDeclaration typeDeclaration = this.referenceBinding.scope.referenceContext;
            typeDeclaration.scope.problemReporter().stringConstantIsExceedingUtf8Limit(defaultValue);
          } else {
            // already inside a problem type creation : no attribute
            this.contentsOffset = attributeOffset;
          }
View Full Code Here

   *
   * @param methodDeclarations Array of all missing abstract methods
   */
  public void generateMissingAbstractMethods(MethodDeclaration[] methodDeclarations, CompilationResult compilationResult) {
    if (methodDeclarations != null) {
      TypeDeclaration currentDeclaration = this.referenceBinding.scope.referenceContext;
      int typeDeclarationSourceStart = currentDeclaration.sourceStart();
      int typeDeclarationSourceEnd = currentDeclaration.sourceEnd();
      for (int i = 0, max = methodDeclarations.length; i < max; i++) {
        MethodDeclaration methodDeclaration = methodDeclarations[i];
        MethodBinding methodBinding = methodDeclaration.binding;
         String readableName = new String(methodBinding.readableName());
         CategorizedProblem[] problems = compilationResult.problems;
View Full Code Here

      //compilation units to process. Thus the field is NOT from a BinaryTypeBinbing
      FieldBinding originalField = original();
      if (originalField.declaringClass instanceof SourceTypeBinding) {
        SourceTypeBinding sourceType = (SourceTypeBinding) originalField.declaringClass;
        if (sourceType.scope != null) {
          TypeDeclaration typeDecl = sourceType.scope.referenceContext;
          FieldDeclaration fieldDecl = typeDecl.declarationOf(originalField);
          MethodScope initScope = originalField.isStatic() ? typeDecl.staticInitializerScope : typeDecl.initializerScope;
          boolean old = initScope.insideTypeAnnotation;
          try {
            initScope.insideTypeAnnotation = false;
            fieldDecl.resolve(initScope); //side effect on binding
View Full Code Here

    ClassScope scope = ((SourceTypeBinding) originalField.declaringClass).scope;
    if (scope == null) { // synthetic fields do not have a scope nor any annotations
      this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
      return 0;
    }
    TypeDeclaration typeDecl = scope.referenceContext;
    FieldDeclaration fieldDecl = typeDecl.declarationOf(originalField);
    if (fieldDecl != null) {
      MethodScope initializationScope = isStatic() ? typeDecl.staticInitializerScope : typeDecl.initializerScope;
      FieldBinding previousField = initializationScope.initializedField;
      int previousFieldID = initializationScope.lastVisibleFieldID;
      try {
View Full Code Here

TOP

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

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.