/** * @deprecated use {@link #findMethodInHierarchy(ITypeHierarchy, IType, String, String[], boolean)} */ public static IMethod findMethodImplementationInHierarchy(ITypeHierarchy hierarchy, IType type, String name, String[] paramTypes, boolean isConstructor) throws JavaModelException { return findMethodInHierarchy(hierarchy, type, name, paramTypes, isConstructor); }
IMethod res= findMethodInHierarchy(hierarchy, superClass, name, paramTypes, isConstructor); if (res != null) { return res; IType[] superInterfaces= hierarchy.getSuperInterfaces(type); for (int i= 0; i < superInterfaces.length; i++) { IMethod res= findMethodInHierarchy(hierarchy, superInterfaces[i], name, paramTypes, false); if (res != null) { return res;
/** * This method is intended for internal use only. This will recursively check the supertype heirarchy for * the passed in method. This will not accept null parameters. It will return null if the method does * not already exist in the heirarchy. * @see NewJavaClassOperation#findMethodImplementationInHierarchy(IMethod, IType) * @see JavaModelUtil#findMethodImplementationInHierarchy(ITypeHierarchy, IType, String, String[], boolean) * * @param tH * @param thisType * @param methodName * @param parameterTypes * @param isConstructor * @return IMethod * @throws JavaModelException */ private IMethod findMethodImplementationInHierarchy(ITypeHierarchy tH, IType thisType, String methodName, String parameterTypes[], boolean isConstructor) throws JavaModelException { IMethod found = JavaModelUtil.findMethod(methodName, parameterTypes, isConstructor, thisType); // If method exists make sure it is not abstract if (found != null && !Flags.isAbstract(found.getFlags())) { return found; } // Check recursively return JavaModelUtil.findMethodInHierarchy(tH, thisType, methodName, parameterTypes, isConstructor); }