public static IMethod findMethod(String name, int parameters, boolean isConstructor, IMethod[] methods) throws JavaModelException { for (int i= methods.length-1; i >= 0; i--) { IMethod curr= methods[i]; if (name.equals(curr.getElementName())) { if (isConstructor == curr.isConstructor()) { if (parameters == curr.getParameterTypes().length) { return curr; } } } } return null;
public static IMethod findMethod(String name, int parameterCount, boolean isConstructor, IType type) throws JavaModelException { return findMethod(name, parameterCount, isConstructor, type.getMethods());
	public static IMethod findMethod(String name, int parameters, boolean isConstructor, IMethod[] methods) throws JavaModelException {			for (int i= methods.length-1; i >= 0; i--) {			IMethod curr= methods[i];			if (name.equals(curr.getElementName())) {				if (isConstructor == curr.isConstructor()) {					if (parameters == curr.getParameterTypes().length) {						return curr;					}				}			}		}		return null;	}