Rev 71366 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed
% File src/library/methods/man/MethodsList-class.Rd% Part of the R package, https://www.R-project.org% Copyright 1995-2015 R Core Team% Distributed under GPL 2 or later\name{MethodsList-class}\alias{MethodsList-class}\alias{body<-,MethodDefinition-method}\docType{class}\title{Class MethodsList, Defunct Representation of Methods }\description{ This class of objects was used in the originalimplementation of the package to control method dispatch. Its useis now defunct, but object appear as the default method slot ingeneric functions. This and any other remaining uses will beremoved in the future.For the modern alternative, see \linkS4class{listOfMethods}.The details in this documentation are retained to allow analysis ofold-style objects. }\section{Slots}{\describe{\item{\code{argument}:}{Object of class \code{"name"}. The name of theargument being used for dispatch at this level. }\item{\code{methods}:}{A named list of the methods (and method lists)defined \emph{explicitly} for this argument.The names are the names of classes, and the correspondingelement defines the method or methods to be used if the correspondingargument has that class. See the details below.}\item{\code{allMethods}:}{A named list, containsall the directly defined methods from the \code{methods} slot, plusany inherited methods. Ignored when methods tables are used for dispatch (see \link{Methods_Details}). }}}\details{Suppose a function \code{f} hasformal arguments \code{x} and \code{y}. The methods list object forthat function has the object \code{as.name("x")} as its\code{argument} slot. An element of the methods named \code{"track"}is selected if the actual argument corresponding to \code{x} is anobject of class \code{"track"}. If there is such an element, it cangenerally be either a function or another methods list object.In the first case, the function defines the method to use for any callin which \code{x} is of class \code{"track"}. In the second case, thenew methods list object defines the available methods depending onthe remaining formal arguments, in this example, \code{y}.Each method corresponds conceptually to a \emph{signature};that is a named list of classes, with names corresponding to some orall of the formal arguments. In the previous example, if selectingclass \code{"track"} for \code{x}, finding that the selection wasanother methods list and then selecting class \code{"numeric"} for\code{y} would produce a method associated with the signature\code{x = "track", y = "numeric"}.}\section{Extends}{Class \code{"OptionalMethods"}, directly.}\keyword{classes}\keyword{methods}