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

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


}
void checkAbstractMethod(MethodBinding abstractMethod) {
  if (mustImplementAbstractMethod(abstractMethod.declaringClass)) {
    TypeDeclaration typeDeclaration = this.type.scope.referenceContext;
    if (typeDeclaration != null) {
      MethodDeclaration missingAbstractMethod = typeDeclaration.addMissingAbstractMethodFor(abstractMethod);
      missingAbstractMethod.scope.problemReporter().abstractMethodMustBeImplemented(this.type, abstractMethod);
    } else {
      problemReporter().abstractMethodMustBeImplemented(this.type, abstractMethod);
    }
  }
View Full Code Here


    if (!this.type.isAbstract()) {
      for (int i = length; --i >= 0;) {
        if (mustImplementAbstractMethod(methods[i].declaringClass)) {
          TypeDeclaration typeDeclaration = this.type.scope.referenceContext;
          if (typeDeclaration != null) {
            MethodDeclaration missingAbstractMethod = typeDeclaration.addMissingAbstractMethodFor(methods[0]);
            missingAbstractMethod.scope.problemReporter().abstractMethodMustBeImplemented(this.type, methods[0]);
          } else {
            problemReporter().abstractMethodMustBeImplemented(this.type, methods[0]);
          }
          return;
View Full Code Here

  boolean inCycle = false; // check each method before failing
  for (int i = 0, l = currentMethods.length; i < l; i++) {
    TypeBinding returnType = currentMethods[i].returnType.leafComponentType();
    if (this == returnType) {
      if (this instanceof SourceTypeBinding) {
        MethodDeclaration decl = (MethodDeclaration) currentMethods[i].sourceMethod();
        ((SourceTypeBinding) this).scope.problemReporter().annotationCircularity(this, this, decl != null ? decl.returnType : null);
      }
    } else if (returnType.isAnnotationType() && ((ReferenceBinding) returnType).detectAnnotationCycle()) {
      if (this instanceof SourceTypeBinding) {
        MethodDeclaration decl = (MethodDeclaration) currentMethods[i].sourceMethod();
        ((SourceTypeBinding) this).scope.problemReporter().annotationCircularity(this, returnType, decl != null ? decl.returnType : null);
      }
      inCycle = true;
    }
  }
View Full Code Here

  //XXX static state bad
  private static int counter = 0;

  //XXX todo: make sure that errors in Arguments only get displayed once
  private MethodDeclaration makeMethod(CompilationResult result, MethodDeclaration enclosingDec) {
    MethodDeclaration ret = new IfMethodDeclaration(result, pointcut);
    ret.modifiers = AccStatic | AccFinal | AccPublic;
    ret.returnType = AstUtil.makeTypeReference(TypeBinding.BooleanBinding);
    ret.selector = ("ajc$if_" + counter++).toCharArray();
    ret.arguments = makeArguments(enclosingDec);
    ret.statements = new Statement[] {
View Full Code Here

   
    // Use reset() rather than init()
    // XXX We need a scope to keep reset happy, initializerScope is *not* the right one, but it works !
//     codeStream.init(classFile);
//     codeStream.initializeMaxLocals(methodBinding);
    MethodDeclaration md = AstUtil.makeMethodDeclaration(methodBinding);
    md.scope = initializerScope;
    codeStream.reset(md,classFile);
   
    // body starts here
    gen.generate(codeStream);
View Full Code Here

  }
 
  public static MethodDeclaration makeMethodDeclaration(
      MethodBinding binding)
  {
    MethodDeclaration ret = new MethodDeclaration(null);
    ret.binding = binding;
    int nargs = binding.parameters.length;
    ret.arguments = new Argument[nargs];
    for (int i=0; i < nargs; i++) {
      ret.arguments[i] = makeFinalArgument(("arg"+i).toCharArray(),
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.