MethodsList
objects, the
objects formerly used in R to store methods for dispatch. Use of
these objects is deprecated since R 3.2.0, as it will rarely be a
good idea. Where methods dispatch is
to be studied, see selectMethod
. For computations
that iterate over methods or over method signatures, see
findMethods
, which returns a linearized methods list
to hold method definitions, usually more convenient for iteration
than the recursive MethodsList
objects.listFromMlist(mlist, prefix = list(), sigs. = TRUE, methods. = TRUE)linearizeMlist(mlist, inherited = TRUE)
finalDefaultMethod(method)
loadMethod(method, fname, envir)
##--------- These are all deprecated, since R 3.2.0 ----------
MethodsList(.ArgName, ...)
makeMethodsList(object, level=1)
SignatureMethod(names, signature, definition)
insertMethod(mlist, signature, args, def, cacheOnly)
inheritedSubMethodLists(object, thisClass, mlist, ev)
showMlist(mlist, includeDefs = TRUE, inherited = TRUE,
classes, useArgNames, printTo = stdout() )
# S3 method for MethodsList
print(x, ...)
mergeMethods(m1, m2, genericLabel)
listFromMlist
:list(sigs,methods)
of function definitions, i.e. of
matching signatures and methods.
prefix
is the partial signature (a named list of classes)
to be prepended to the signatures in this object. If sigs.
or methods.
are FALSE
, the resulting part of the
return value will be empty. A utility function used to iterate over all the individual methods
in the object, it calls itself recursively.
linearizeMlist
:listFromMlist
instead.
finalDefaultMethod
:"MethodsList"
objects, this function only checks that the
value given it is a method definition, primitive or NULL.
loadMethod
:method
is
dispatched in the frame envir
. The function exists so that
methods can be defined for special classes of objects. Usually
the point is to assign or modify information in the frame
environment to be used evaluation. For example, the standard
class MethodDefinition
has a method that stores the target
and defined signatures in the environment. Class
MethodWithNext
has a method taking account of the
mechanism for storing the method to be used in a call to
callNextMethod
. Any methods defined for loadMethod
must return the function
definition to be used for this call; typically, this is just the
method
argument.