Attempts to find the "next" method in the inheritance chain. This would
(ideally) be the method that methods::callNextMethod()
would chain to,
as a result of the method methods::addNextMethod()
would find (and return
in the nextMethod
slot of the MethodWithNext
object). Hence, in theory one shouldn't ever need this, but unfortunately
addNextMethod()
is broken (and errors out) if one of the classes in the
signature name-clashes with an S4 class defined in another package that is
loaded.
findNextMethod(method, f = NULL, envir = topenv())
a MethodDefinition
object that is the next method in the
chain by inheritance
MethodDefinition
, the method for which to find
the next method
standardGeneric
, the standard generic for which to find
the next method. By default this will be obtained from method
.
the environment in which to find the method
The next method will be determined by the S4 inheritance chain. However,
this function will walk only the inheritance chain of those arguments in
the signature that are defined in the package of the generic method from
which this function was invoked (directly or indirectly). If there are
no such parameters in the signature, or if there is more than one,
finding the next method is handed off to methods::addNextMethod()
.