Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IMethod


      methodsByName.put(methods[i].getElementName(), methods[i]);
    }
  }

  private IMethod getMethod(final String name) {
    final IMethod m = (IMethod) methodsByName.get(name);
    assertNotNull(m);
    return m;
  }
View Full Code Here


    return m;
  }

  private void assertSignature(final String methodName, final String signature)
      throws Exception {
    final IMethod method = getMethod(methodName);
    assertEquals(signature, SignatureResolver.getParameters(method));
  }
View Full Code Here

    javaProject.destroy();
  }

  @Test
  public void test_innerClassTypeVariable() throws Exception {
    final IMethod method = type.getType("Inner").getMethods()[0];
    assertEquals(SignatureResolver.getParameters(method),
        "Ljava/lang/Comparable;");
  }
View Full Code Here

        }
        String[] paramtypes = Signature.getParameterTypes(ubmethods[i].signature);
        for (int j = 0; j < paramtypes.length; j++) {
          paramtypes[j] = paramtypes[j].replace('/', '.');
        }
        IMethod pattern = type.getMethod(name, paramtypes);
        IMethod[] hits = type.findMethods(pattern);
        if (hits != null && hits.length == 1) {
          modelcoverage.put(hits[0], ubmethods[i].coverage);
        } else {
          TRACER.trace("Method not found in Java model: {0}.{1}{2}", type.getElementName(), name, ubmethods[i].signature); //$NON-NLS-1$
View Full Code Here

    javaProject.destroy();
  }

  private final void assertMethod(final String expectedKey, final String name,
      final String signature) {
    final IMethod method = methodLocator.findMethod(name, signature);
    assertNotNull(method);
    assertEquals(expectedKey, method.getKey());
  }
View Full Code Here

  protected void tearDown() throws Exception {
    javaProject.destroy();
  }

  public void test_innerClassTypeVariable() throws Exception {
    final IMethod method = type.getType("Inner").getMethods()[0];
    assertEquals(SignatureResolver.getParameters(method),
        "Ljava/lang/Comparable;");
  }
View Full Code Here

      methodsByName.put(methods[i].getElementName(), methods[i]);
    }
  }

  private IMethod getMethod(final String name) {
    final IMethod m = (IMethod) methodsByName.get(name);
    assertNotNull(m);
    return m;
  }
View Full Code Here

    return m;
  }

  private void assertSignature(final String methodName, final String signature)
      throws Exception {
    final IMethod method = getMethod(methodName);
    assertEquals(signature, SignatureResolver.getParameters(method));
  }
View Full Code Here

    javaProject.destroy();
  }

  private final void assertMethod(final String expectedKey, final String name,
      final String signature) {
    final IMethod method = methodLocator.findMethod(name, signature);
    assertNotNull(method);
    assertEquals(expectedKey, method.getKey());
  }
View Full Code Here

    IJavaElement[] children = type.getChildren();
    for (int i = 0; i < children.length && !monitor.isCanceled(); i++) {
      IJavaElement child = children[i];
      switch (child.getElementType()) {
      case IJavaElement.METHOD:
        IMethod method = (IMethod) child;
        if (methodvisitor != null) {
          methodvisitor.visit(method, resolver.resolve(method));
        }
        processAnonymousInnerTypes(visitor, aenum, method, monitor);
        break;
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.IMethod

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.