Help me make this method more solid:
/**
* Check if the method is declared in the interface.
* Assumes the method was obtained from a concrete class that
* implements the interface, and return true if the method overrides
* a method from the interface.
*/
public static boolean isDeclaredInInterface(Method method, Class<?> interfaceClass) {
for (Method methodInInterface : interfaceClass.getMethods())
{
if (methodInInterface.getName().equals(method.getName()))
return true;
}
return false;
}