The R Project SVN R

Rev

Rev 23531 | Rev 40284 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
19087 jmc 1
\name{MethodDefinition-class}
2
\docType{class}
3
\alias{MethodDefinition-class}
23898 jmc 4
\alias{SealedMethodDefinition-class}
21544 ripley 5
\title{Classes to Represent Method Definitions}
6
\description{
7
  These classes extend the basic class \code{"function"} when
8
  functions are to be stored and used as method definitions.
9
}
19087 jmc 10
\section{Objects from the Class}{
23898 jmc 11
  The action of setting a method by a call to \code{\link{setMethod}} creates an object of this class.  It's
21544 ripley 12
  unwise to create them directly.
23898 jmc 13
 
14
  The class \code{"SealedMethodDefinition"} is created by a call to
15
  \code{\link{setMethod}} with argument \code{sealed = TRUE}.  It has
16
  the same representation as \code{"MethodDefinition"}.
19087 jmc 17
}
18
\section{Slots}{
19
  \describe{
20
    \item{\code{.Data}:}{Object of class \code{"function"}; the data
21
        part of the definition. }
22
    \item{\code{target}:}{Object of class \code{"signature"}; the
23
        signature for which the method was wanted. }
24
    \item{\code{defined}:}{Object of class \code{"signature"}; the
25
        signature for which a method was found.  If the method was
26
        inherited, this will not be identical to \code{target}. }
27
  }
28
}
29
\section{Extends}{
21544 ripley 30
  Class \code{"function"}, from data part.\cr
31
  Class \code{"PossibleMethod"}, directly.\cr
23531 hornik 32
  Class \code{"OptionalMethods"}, by class \code{"function"}.
19087 jmc 33
}
20092 jmc 34
\details{
35
  Method definition objects are functions with additional information
36
  defining how the function is being used as a method.  The
37
  \code{target} slot is the class signature for which the method will
38
  be dispatched, and the \code{defined} slot the signature for which
39
  the method was orignally specified (that is, the one that appeared
40
  in some call to \code{\link{setMethod}}).
19087 jmc 41
}
21544 ripley 42
\seealso{class \code{\link{MethodsList-class}} for the objects
20092 jmc 43
  defining sets of methods associated with a particular generic
44
  function.  The individual method definitions stored in these objects
45
  are from class \code{MethodDefinition}, or an extension.
21544 ripley 46
  \code{\link{MethodWithNext-class}} for an extension used by
47
  \code{\link{callNextMethod}}.
48
}
19087 jmc 49
\keyword{classes}