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

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


    generatingToken = CompilationAndWeavingContext.enteringPhase(
        CompilationAndWeavingContext.GENERATING_UNWOVEN_CODE_FOR_COMPILATION_UNIT, unit.getFileName());
    if (eWorld.pushinCollector != null) {
      if (unit.types != null && unit.types.length > 0) {
        for (int t = 0; t < unit.types.length; t++) {
          TypeDeclaration type = unit.types[t];
          if (type.methods != null) {
            for (int m = 0; m < type.methods.length; m++) {
              AbstractMethodDeclaration md = type.methods[m];
              if (md instanceof InterTypeMethodDeclaration) {
                InterTypeMethodDeclaration itmd = ((InterTypeMethodDeclaration) md);
View Full Code Here


   */
  private boolean containsAnAspect(CompilationUnitDeclaration cud) {
    TypeDeclaration[] typeDecls = cud.types;
    if (typeDecls != null) {
      for (int i = 0; i < typeDecls.length; i++) { // loop through top level types in the file
        TypeDeclaration declaration = typeDecls[i];
        if (isAspect(declaration)) {
          return true;
        }
        if (declaration.memberTypes != null) {
          TypeDeclaration[] memberTypes = declaration.memberTypes;
View Full Code Here

      classFile.recordInnerClasses(this.binding);
    }

    if (this.memberTypes != null) {
      for (int i = 0, max = this.memberTypes.length; i < max; i++) {
        TypeDeclaration memberType = this.memberTypes[i];
        classFile.recordInnerClasses(memberType.binding);
        memberType.generateCode(this.scope, classFile);
      }
    }
    // generate all methods
    classFile.setForMethodInfos();
    if (this.methods != null) {
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

      contents[contentsOffset++] = methodIndexByte1;
      contents[contentsOffset++] = methodIndexByte2;
      attributeNumber++;     
    }
    if (this.targetJDK >= ClassFileConstants.JDK1_5 && !this.creatingProblemType) {
      TypeDeclaration typeDeclaration = referenceBinding.scope.referenceContext;
      if (typeDeclaration != null) {
          // AspectJ Extension - use the original array if its set
        // original code:
        // final Annotation[] annotations = typeDeclaration.annotations;
        // new code:
View Full Code Here

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

        int stringValueIndex =
          constantPool.literalIndex(((StringConstant) constant).stringValue().toCharArray());
        if (stringValueIndex == -1) {
          if (!creatingProblemType) {
            // report an error and abort: will lead to a problem type classfile creation
            TypeDeclaration typeDeclaration = referenceBinding.scope.referenceContext;
            typeDeclaration.scope.problemReporter().stringConstantIsExceedingUtf8Limit(defaultValue);
          } else {
            // already inside a problem type creation : no attribute
            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

    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

      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

TOP

Related Classes of org.aspectj.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.