Examples of resolveMethodBinding()


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

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

      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

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

      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

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

    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

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

      "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

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

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

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

      break;
    }

    case ASTNode.SUPER_METHOD_INVOCATION: {
      final SuperMethodInvocation sm = (SuperMethodInvocation) node;
      final IMethod meth = (IMethod) sm.resolveMethodBinding()
          .getJavaElement();
      final IMethod top = Util.getTopMostSourceMethod(meth, this.monitor);

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

Examples of org.eclipse.php.internal.core.ast.nodes.MethodDeclaration.resolveMethodBinding()

    ClassDeclaration classDeclaration = (ClassDeclaration) program
        .statements().get(0);
    MethodDeclaration methodDeclaration = (MethodDeclaration) classDeclaration
        .getBody().statements().get(0);

    IMethodBinding methodBinding = methodDeclaration.resolveMethodBinding();
    Assert.assertNotNull(methodBinding);
    Assert.assertTrue(methodBinding.getName().equals("foo"));
    Assert.assertNotNull(methodBinding.getDeclaringClass());
    Assert.assertTrue(methodBinding.getDeclaringClass().getName()
        .equals("MyClass"));
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.MethodDeclaration.resolveMethodBinding()

    ClassDeclaration classDeclaration = (ClassDeclaration) program
        .statements().get(0);
    MethodDeclaration methodDeclaration = (MethodDeclaration) classDeclaration
        .getBody().statements().get(0);

    IMethodBinding methodBinding = methodDeclaration.resolveMethodBinding();
    Assert.assertNotNull(methodBinding);
    Assert.assertTrue(methodBinding.getName().equals("foo"));
    Assert.assertNotNull(methodBinding.getDeclaringClass());
    Assert.assertTrue(methodBinding.getDeclaringClass().getName()
        .equals("MyClass"));
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.MethodInvocation.resolveMethodBinding()

    ExpressionStatement statement = (ExpressionStatement) program
        .statements().get(2);
    MethodInvocation methodInvocation = (MethodInvocation) statement
        .getExpression();
    IMethodBinding methodBinding = methodInvocation.resolveMethodBinding();

    Assert.assertNotNull(methodBinding);
    Assert.assertTrue(methodBinding.getName().equals("mymethod"));
    Assert.assertNotNull(methodBinding.getDeclaringClass());
    Assert.assertTrue(methodBinding.getDeclaringClass().getName()
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.