Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.MethodInvocation.resolveMethodBinding()


    boolean invokesGetInst = false;

    if (gparent instanceof MethodInvocation) // method invocation follows
    {
      MethodInvocation inv = (MethodInvocation) gparent;
      IMethodBinding meth = inv.resolveMethodBinding();

      if ( MockUtil.GET_INST.equals(meth.getName()))
      {
        invokesGetInst = true;
        if (gparent.getParent() instanceof ExpressionStatement)
View Full Code Here


      final MethodInvocation mi = (MethodInvocation) node;

      // if coming up from a argument.
      if (containedIn(mi.arguments(), this.name)) {
        // if we don't have the source, no can do.
        if (!mi.resolveMethodBinding().getDeclaringClass()
            .isFromSource())
          throw new DefinitelyNotEnumerizableException(
              Messages.ASTNodeProcessor_SourceNotPresent, node);
        else
          // go find the formals.
View Full Code Here

      break;
    }

    case ASTNode.METHOD_INVOCATION: {
      final MethodInvocation m = (MethodInvocation) node;
      final IMethod meth = (IMethod) m.resolveMethodBinding()
          .getJavaElement();
      final IMethod top = Util.getTopMostSourceMethod(meth, this.monitor);

      if (top == null)
        throw new DefinitelyNotEnumerizableException(
View Full Code Here

    if (parent instanceof MethodInvocation) {
      MethodInvocation mi = (MethodInvocation) parent;
      if (mi.arguments().contains(node)
          && !TypeUtil
              .isOverloaded(mi.resolveMethodBinding(), object)) {
        return false;
      }
    }

    return true;
View Full Code Here

      "public void bar(sharpen.ui.tests.BindingTestCaseSubject.Baz b) { b.bar(); }" +
      "}";
    CompilationUnit ast = createAST(source);
    MethodDeclaration method = getType(ast, "Gazonk").getMethods()[0];
    MethodInvocation invocation = getFirstMethodInvocation(method);
    IMethodBinding definition = BindingUtils.findMethodDefininition(invocation.resolveMethodBinding(), null);
    assertEquals("sharpen.ui.tests.BindingTestCaseSubject.Foo.bar", BindingUtils.qualifiedName(definition));
  }

  private MethodInvocation getFirstMethodInvocation(MethodDeclaration method) {
    ExpressionStatement stmt = (ExpressionStatement) method.getBody().statements().get(0);
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.