Tests whether the specified method can be overridden/implemented by another method (of a descendant class).

The function uses the Doclet API method:

com.sun.javadoc.MethodDoc.overrides(MethodDoc)
and returns the result produced roughly by the call:
overridingMethod.overrides(method)

The need of such a function arises because of generic types introduced since Java 5. Before that, resolving whether a method overrides/implements another method could be done simply by comparing the parameter signatures of both methods as strings. But now, when a method has parameters whose types involve type variables, the situation cannot be resolved that simple.

Parameter:

method

The MethodDoc element representing the method to be overridden.

If the passed element is not an instance of MethodDoc, the function will return false.

If this parameter is not specified, the generator context element is assumed, i.e. the same as the call: contextElement.isOverriddenBy(overridingMethod)

overridingMethod
The MethodDoc element representing the overriding method.

If this is not an instance of MethodDoc, the function will return false.

Returns:

true, if the method method can be overridden/implemented by the method overridingMethod; false, otherwise