Examples of AbstractMethodDeclaration


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

    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

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

    // declaration for the member. This is because on the incremental build the member will likely represent something
    // inside a binary type (BinaryTypeBinding) - and when that happens we should not look on the type declaration but
    // instead on the delegate for the declaringClass because it will likely be a BcelObjectType with the right stuff
    // in it - see the other checks on BcelObjectType in this class.
    if (realBinding instanceof MethodBinding) {
      AbstractMethodDeclaration methodDecl = getTypeDeclaration().declarationOf((MethodBinding) realBinding);
      if (methodDecl instanceof AnnotationMethodDeclaration) {
        AnnotationMethodDeclaration annoMethodDecl = (AnnotationMethodDeclaration) methodDecl;
        Expression e = annoMethodDecl.defaultValue;
        if (e.resolvedType == null) {
          e.resolve(methodDecl.scope);
View Full Code Here

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

    }
    if (realBinding instanceof FieldBinding) {
      argumentNames = NO_ARGS;
    } else {
      TypeDeclaration typeDecl = getTypeDeclaration();
      AbstractMethodDeclaration methodDecl = (typeDecl == null ? null : typeDecl.declarationOf((MethodBinding) realBinding));
      Argument[] args = (methodDecl == null ? null : methodDecl.arguments); // dont
      // like
      // this
      // -
      // why
View Full Code Here

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

    // 1. code is broken
    // 2. this resolvedmember is an EclipseResolvedMember created up front to represent a privileged'd accessed member
    if (tDecl != null) {
      if (realBinding instanceof MethodBinding) {
        MethodBinding methodBinding = (MethodBinding) realBinding;
        AbstractMethodDeclaration methodDecl = tDecl.declarationOf(methodBinding);
        if (methodDecl == null) {
          // pr284862
          // bindings may have been trashed by InterTypeMemberFinder.addInterTypeMethod() - and so we need to take
          // a better look. Really this EclipseResolvedMember is broken...
View Full Code Here

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

              occurenceCount++;
            }
          }
        } else {
          // method element
          AbstractMethodDeclaration method = methodScope.referenceMethod();
          newElement = parentType.getMethod(new String(method.selector), Util.typeParameterSignatures(method));
          if (newElement != null) {
            knownScopes.put(scope, newElement);
          }
        }
View Full Code Here

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

    return fieldDeclaration;
  }
 
  private static AbstractMethodDeclaration convert(IMethod method, IType type, CompilationResult compilationResult) throws JavaModelException {

    AbstractMethodDeclaration methodDeclaration;

    if (method.isConstructor()) {
      ConstructorDeclaration decl = new ConstructorDeclaration(compilationResult);
      decl.bits &= ~ASTNode.IsDefaultConstructor;
      methodDeclaration = decl;
View Full Code Here

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

    if (neededCount != 0) { // add default constructor in first position
      typeDeclaration.methods[0] = typeDeclaration.createDefaultConstructor(false, false);
    }
    boolean hasAbstractMethods = false;
    for (int i = 0; i < methodCount; i++) {
      AbstractMethodDeclaration method =convert(methods[i], type, compilationResult);
      boolean isAbstract;
      if ((isAbstract = method.isAbstract()) || isInterface) { // fix-up flag
        method.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
      }
      if (isAbstract) {
        hasAbstractMethods = true;
      }
View Full Code Here

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

      //methods
      AbstractMethodDeclaration[] methods = types[j].methods;
      if (methods != null) {
        int length = methods.length;
        for (int i = 0; i < length; i++) {
          AbstractMethodDeclaration method = methods[i];
          if(containsIgnoredBody(method)) {
            if(containsErrorInSignature(method)) {
              method.bits |= ASTNode.ErrorInSignature;
              result.addInterval(method.declarationSourceStart, method.declarationSourceEnd, IGNORE);
            } else {
View Full Code Here

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

        } else {
          // we can create a new FieldDeclaration
          typeDecl.bodyDeclarations().add(convertToFieldDeclaration(fieldDeclaration));
        }
      } else if(node instanceof org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration) {
        AbstractMethodDeclaration nextMethodDeclaration = (AbstractMethodDeclaration) node;
        if (!nextMethodDeclaration.isDefaultConstructor() && !nextMethodDeclaration.isClinit()) {
          typeDecl.bodyDeclarations().add(convert(nextMethodDeclaration));
        }
      } else if(node instanceof org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) {
        org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration nextMemberDeclaration = (org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) node;
        ASTNode nextMemberDeclarationNode = convert(nextMemberDeclaration);
View Full Code Here

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

      }
    } else if (currentNode instanceof AbstractTypeDeclaration) {
      org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDecl = (org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) this.ast.getBindingResolver().getCorrespondingNode(currentNode);
      return typeDecl.initializerScope;
    }
    AbstractMethodDeclaration abstractMethodDeclaration = (AbstractMethodDeclaration) this.ast.getBindingResolver().getCorrespondingNode(currentNode);
    return abstractMethodDeclaration.scope;
  }
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.