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

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


          return;
         
        // anonymous constructors are allowed to throw any exceptions (their thrown exceptions
        // clause will be fixed up later as per JLS 8.6).
        if (exceptionContext.associatedNode instanceof AbstractMethodDeclaration){
          AbstractMethodDeclaration method = (AbstractMethodDeclaration)exceptionContext.associatedNode;
          if (method.isConstructor() && method.binding.declaringClass.isAnonymousType()){
               
            exceptionContext.mergeUnhandledException(raisedException);
            return; // no need to complain, will fix up constructor exceptions           
          }
        }
View Full Code Here


          }
        }
        // anonymous constructors are allowed to throw any exceptions (their thrown exceptions
        // clause will be fixed up later as per JLS 8.6).
        if (exceptionContext.associatedNode instanceof AbstractMethodDeclaration){
          AbstractMethodDeclaration method = (AbstractMethodDeclaration)exceptionContext.associatedNode;
          if (method.isConstructor() && method.binding.declaringClass.isAnonymousType()){
             
            for (int i = 0; i < raisedCount; i++) {
              TypeBinding raisedException;
              if ((raisedException = raisedExceptions[i]) != null) {
                exceptionContext.mergeUnhandledException(raisedException);
View Full Code Here

    priority += P_ERROR;
  }
  ReferenceContext context = this.problemsMap == null ? null : (ReferenceContext) this.problemsMap.get(problem);
  if (context != null){
    if (context instanceof AbstractMethodDeclaration){
      AbstractMethodDeclaration method = (AbstractMethodDeclaration) context;
      if (method.isStatic()) {
        priority += P_STATIC;
      }
    } else {
      priority += P_OUTSIDE_METHOD;
    }
View Full Code Here

      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);
                ITDMethodPrinter printer = new ITDMethodPrinter(itmd, md.scope);
                String s = printer.print();
                eWorld.pushinCollector.recordInterTypeMethodDeclarationCode(md, s, getDeclarationLineNumber(md));
View Full Code Here

      }
    }
    if (td.methods != null) {
      for (int i = 0; i < td.methods.length; i++) {
        if (td.methods[i] != null) {
          AbstractMethodDeclaration amd = td.methods[i];
          if (amd instanceof MethodDeclaration) {
            output.append('\n');
            printMethodDeclaration(((MethodDeclaration) amd), indent + 1);
          } else if (amd instanceof ConstructorDeclaration) {
            if (!isAnonymous) {
View Full Code Here

      if (typeBinding.isInterface()) {
        // we cannot create problem methods for an interface. So we have to generate a clinit
        // which should contain all the problem
        classFile.addProblemClinit(problemsCopy);
        for (int i = 0, length = methodDecls.length; i < length; i++) {
          AbstractMethodDeclaration methodDecl = methodDecls[i];
          MethodBinding method = methodDecl.binding;
          if (method == null || method.isConstructor()) continue;
          classFile.addAbstractMethod(methodDecl, method);
        }   
      } else {
        for (int i = 0, length = methodDecls.length; i < length; i++) {
          AbstractMethodDeclaration methodDecl = methodDecls[i];
          MethodBinding method = methodDecl.binding;
          if (method == null) continue;
          if (method.isConstructor()) {
            classFile.addProblemConstructor(methodDecl, method, problemsCopy);
          } else {
View Full Code Here

      contents[contentsOffset++] = (byte) (signatureIndex >> 8);
      contents[contentsOffset++] = (byte) signatureIndex;
      attributeNumber++;
    }
    if (this.targetJDK >= ClassFileConstants.JDK1_5 && !this.creatingProblemType && !createProblemMethod) {
      AbstractMethodDeclaration methodDeclaration = methodBinding.sourceMethod();
      if (methodDeclaration != null) {
        Annotation[] annotations = methodDeclaration.annotations;
        if (annotations != null) {
          attributeNumber += generateRuntimeAnnotations(annotations);
        }
View Full Code Here

   * @see org.aspectj.org.eclipse.jdt.core.dom.BindingResolver#resolveMember(org.aspectj.org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration)
   */
  IMethodBinding resolveMember(AnnotationTypeMemberDeclaration declaration) {
    Object oldNode = this.newAstToOldAst.get(declaration);
    if (oldNode instanceof AbstractMethodDeclaration) {
      AbstractMethodDeclaration methodDeclaration = (AbstractMethodDeclaration) oldNode;
      IMethodBinding methodBinding = this.getMethodBinding(methodDeclaration.binding);
      if (methodBinding == null) {
        return null;
      }
      this.bindingsToAstNodes.put(methodBinding, declaration);
View Full Code Here

   * Method declared on BindingResolver.
   */
  synchronized IMethodBinding resolveMethod(MethodDeclaration method) {
    Object oldNode = this.newAstToOldAst.get(method);
    if (oldNode instanceof AbstractMethodDeclaration) {
      AbstractMethodDeclaration methodDeclaration = (AbstractMethodDeclaration) oldNode;
      IMethodBinding methodBinding = this.getMethodBinding(methodDeclaration.binding);
      if (methodBinding == null) {
        return null;
      }
      this.bindingsToAstNodes.put(methodBinding, method);
View Full Code Here

          }
          return null;
        }
      }
    } else if (node instanceof AbstractMethodDeclaration) {
      AbstractMethodDeclaration methodDeclaration = (AbstractMethodDeclaration) node;
      IMethodBinding method = this.getMethodBinding(methodDeclaration.binding);
      if (method == null) return null;
      return method.getReturnType();
    } else if (node instanceof org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) {
      org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration = (org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) node;
View Full Code Here

TOP

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

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.