Examples of TypeDeclaration


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

   *
   * @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

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

    int methodIndex = 0, methodCount = (typeDeclaration.methods == null) ? 0 : typeDeclaration.methods.length;
    AbstractMethodDeclaration method = methodCount == 0 ? null : typeDeclaration.methods[methodIndex];
    int methodStart = method == null ? Integer.MAX_VALUE : method.declarationSourceStart;

    int typeIndex = 0, typeCount = (typeDeclaration.memberTypes == null) ? 0 : typeDeclaration.memberTypes.length;
    TypeDeclaration type = typeCount == 0 ? null : typeDeclaration.memberTypes[typeIndex];
    int typeStart = type == null ? Integer.MAX_VALUE : type.declarationSourceStart;
 
    final int memberLength = fieldCount+methodCount+typeCount;
    ASTNode[] members = new ASTNode[memberLength];
    if (memberLength != 0) {
View Full Code Here

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

      this.preferences.insert_space_after_comma_in_enum_constant_arguments,
      this.preferences.alignment_for_arguments_in_enum_constant);     
   
    Expression initialization = enumConstant.initialization;
    if (initialization instanceof QualifiedAllocationExpression) {
      TypeDeclaration typeDeclaration = ((QualifiedAllocationExpression) initialization).anonymousType;
      int fieldsCount = typeDeclaration.fields == null ? 0 : typeDeclaration.fields.length;
      int methodsCount = typeDeclaration.methods == null ? 0 : typeDeclaration.methods.length;
      int membersCount = typeDeclaration.memberTypes == null ? 0 : typeDeclaration.memberTypes.length;
     
      /*
 
View Full Code Here

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

      this.scribe.exitAlignment(argumentsAlignment, true);
      this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_before_closing_paren_in_method_invocation);
    } else {
      this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_between_empty_parens_in_method_invocation);
    }
    final TypeDeclaration anonymousType = qualifiedAllocationExpression.anonymousType;
    if (anonymousType != null) {
      formatLeftCurlyBrace(line, this.preferences.brace_position_for_anonymous_type_declaration);
      formatAnonymousTypeDeclaration(anonymousType);
    }
    if (numberOfParens > 0) {
View Full Code Here

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

  // ignore closed anonymous type
  if ((typeDeclaration.bits & ASTNode.IsAnonymousType) != 0 && !this.preserveContent){
    return null;
  }
   
  TypeDeclaration updatedType = this.updatedTypeDeclaration();
  if ((updatedType.bits & ASTNode.IsAnonymousType) != 0){
    /* in presence of an anonymous type, we want the full allocation expression */
    QualifiedAllocationExpression allocation = updatedType.allocation;
   
    if (allocation.statementEnd == -1) {
View Full Code Here

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

            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

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

  Map<TypeVariableBinding, String> /* real type variable > alias letter */usedAliases; // Used later when reconstructing the
                                            // resolved member

  public InterTypeScope(Scope parent, ReferenceBinding onType) {
    super(parent, null);
    referenceContext = new TypeDeclaration(null);
    referenceContext.binding = makeSourceTypeBinding(onType);
    this.onType = onType;
  }
View Full Code Here

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

  if (this.anonymousTypes != null) {
    if(fieldDeclaration.initialization == null) {
      for (int i = 0; i < this.anonymousTypeCount; i++){
        RecoveredType recoveredType = anonymousTypes[i];
        TypeDeclaration typeDeclaration = recoveredType.typeDeclaration;
        if(typeDeclaration.declarationSourceEnd == 0) {
          typeDeclaration.declarationSourceEnd = this.fieldDeclaration.declarationSourceEnd;
          typeDeclaration.bodyEnd = this.fieldDeclaration.declarationSourceEnd;
        }
        if (recoveredType.preserveContent){
          TypeDeclaration anonymousType = recoveredType.updatedTypeDeclaration();
          fieldDeclaration.initialization = anonymousType.allocation;
          if(this.fieldDeclaration.declarationSourceEnd == 0) {
            int end = anonymousType.declarationSourceEnd;
            this.fieldDeclaration.declarationSourceEnd = end;
            this.fieldDeclaration.declarationEnd = end;
          }
        }
      }
      if (this.anonymousTypeCount > 0) fieldDeclaration.bits |= ASTNode.HasLocalType;
    } else if(fieldDeclaration.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT) {
      // fieldDeclaration is an enum constant
      for (int i = 0; i < this.anonymousTypeCount; i++){
        RecoveredType recoveredType = anonymousTypes[i];
        TypeDeclaration typeDeclaration = recoveredType.typeDeclaration;
        if(typeDeclaration.declarationSourceEnd == 0) {
          typeDeclaration.declarationSourceEnd = this.fieldDeclaration.declarationSourceEnd;
          typeDeclaration.bodyEnd = this.fieldDeclaration.declarationSourceEnd;
        }
        recoveredType.updatedTypeDeclaration();
View Full Code Here

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

      this.types[this.typeCount - 1].typeDeclaration.declarationSourceEnd = this.unitDeclaration.sourceEnd;
      this.types[this.typeCount - 1].typeDeclaration.bodyEnd = this.unitDeclaration.sourceEnd;
    }
    int actualCount = existingCount;
    for (int i = 0; i < this.typeCount; i++){
      TypeDeclaration typeDecl = this.types[i].updatedTypeDeclaration();
      // filter out local types (12454)
      if ((typeDecl.bits & ASTNode.IsLocalType) == 0){
        typeDeclarations[actualCount++] = typeDecl;
      }
    }
View Full Code Here

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

      CompilationUnitScope cus = units[i].scope;
      SourceTypeBinding[] stbs = cus.topLevelTypes;
      for (int j = 0; j < stbs.length; j++) {
        SourceTypeBinding stb = stbs[j];
        typesToProcess.add(stb);
        TypeDeclaration typeDeclaration = stb.scope.referenceContext;
        if (typeDeclaration instanceof AspectDeclaration) {
          aspectsToProcess.add(stb);
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.