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

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


    pushOnAstStack(adviceDecl);
  }
 
  protected void consumePointcutDesignatorOnAdvice() {
    ASTNode des = popPointcutDesignator("{");
    MethodDeclaration adviceDecl = (MethodDeclaration)astStack[astPtr];
    declarationFactory.setPointcutDesignatorOnAdvice(adviceDecl,des);
    adviceDecl.sourceEnd =   des.sourceEnd;
    adviceDecl.bodyStart = des.sourceEnd+1;
  }
View Full Code Here


    adviceDecl.bodyStart = des.sourceEnd+1;
  }
 
  protected void consumePointcutDesignatorOnDeclaration() {
    ASTNode des = popPointcutDesignator(";");
    MethodDeclaration pcutDecl = (MethodDeclaration)astStack[astPtr];
    declarationFactory.setPointcutDesignatorOnPointcut(pcutDecl,des);
    pcutDecl.sourceEnd =   des.sourceEnd;
    pcutDecl.bodyStart = des.sourceEnd+1;
    pcutDecl.bodyEnd = endPosition;
    pcutDecl.declarationSourceEnd = flushCommentsDefinedPriorTo(endStatementPosition);
View Full Code Here

 
 
  protected void consumeBasicAdviceHeaderName(boolean isAfter) {
    // BasicAdviceHeaderName ::= 'before'|'after '('
   
    MethodDeclaration adviceDecl =
      (isAfter ? declarationFactory.createAfterAdviceDeclaration(compilationUnit.compilationResult) :
            declarationFactory.createBeforeAdviceDeclaration(compilationUnit.compilationResult));
   
        // skip the name of the advice
    long pos = eatIdentifier();
View Full Code Here

      char[] name = identifierStack[identifierPtr--];
      identifierLengthPtr--;
     
      //System.out.println("extra parameter: " + new String(name));
     
      MethodDeclaration adviceDecl = (MethodDeclaration)astStack[astPtr];
      if (declarationFactory.isAfterAdvice(adviceDecl)) {
        //XXX error, extra param makes no sense here
      }
     
      if (CharOperation.equals(name, "throwing".toCharArray())) {
View Full Code Here

 

  protected void consumeDeclareDeclaration() {
    concatNodeLists();
    ASTNode tokens = popPseudoTokens(";");
    MethodDeclaration declareDecl = declarationFactory.createDeclareDeclaration(this.compilationUnit.compilationResult,tokens,this);
//    println("parsed declare: " + declare);
    display();
    pushOnAstStack(declareDecl);
  }
View Full Code Here

          annotations = new Annotation[length],
          0,
          length);
      }

      MethodDeclaration declareDecl = declarationFactory.createDeclareAnnotationDeclaration(this.compilationUnit.compilationResult,tokens,annotations[0],this,kind);
      pushOnAstStack(declareDecl);
  }
View Full Code Here

    this.display();

    int decSourceStart = intStack[intPtr--];
    int fieldModifiers = intStack[intPtr--];

    MethodDeclaration dec = declarationFactory.createInterTypeFieldDeclaration(
        this.compilationUnit.compilationResult,
        onType);
   
    dec.returnType = returnType;
    dec.sourceStart = start;
View Full Code Here

    pushOnAstStack(dec);
    println("consumed field: " + dec);
    this.display();
}
  protected void consumeExitITDVariableWithoutInitializer() {
    MethodDeclaration itdDecl = (MethodDeclaration) this.astStack[this.astPtr];
    declarationFactory.setInitialization(itdDecl,null);
  }
View Full Code Here

    MethodDeclaration itdDecl = (MethodDeclaration) this.astStack[this.astPtr];
    declarationFactory.setInitialization(itdDecl,null);
  }
  protected void consumeExitITDVariableWithInitializer() {
    this.expressionLengthPtr--;
    MethodDeclaration itdDecl = (MethodDeclaration) this.astStack[this.astPtr];
    Expression initialization = this.expressionStack[this.expressionPtr--];
    declarationFactory.setInitialization(itdDecl,initialization);
    // we need to update the declarationSourceEnd of the local variable declaration to the
    // source end position of the initialization expression
    itdDecl.declarationSourceEnd = initialization.sourceEnd;
View Full Code Here

    // source end position of the initialization expression
    itdDecl.declarationSourceEnd = initialization.sourceEnd;
  }

  protected void consumeInterTypeFieldDeclaration() {
    MethodDeclaration dec = (MethodDeclaration) this.astStack[this.astPtr];

    dec.bodyEnd = endPosition;
    dec.declarationSourceEnd = flushCommentsDefinedPriorTo(endStatementPosition);
  }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration

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.