classRepresentation-class {methods} | R Documentation |
These are the objects that hold the definition of
classes of objects. They are constructed and stored as meta-data by
calls to the function setClass
. Don't manipulate them
directly, except perhaps to look at individual slots.
Class definitions are stored as metadata in various packages.
Additional metadata supplies information on inheritance (the result of
calls to setIs
). Inheritance information implied by the
class definition itself (because the class contains one or more other
classes) is also constructed automatically.
When a class is to be used in an R session, this information is
assembled to complete the class definition. The completion is a
second object of class "classRepresentation"
, cached for the
session or until something happens to change the information. A call
to getClass
returns the completed definition of a class;
a call to getClassDef
returns the stored definition
(uncompleted).
In particular, completion fills in the upward- and downward-pointing
inheritance information for the class, in slots contains
and
subclasses
respectively. It's in principle important to note
that this information can depend on which packages are installed,
since these may define additional subclasses or superclasses.
slots
:contains
:SClassExtension-class
. The list may be only the
direct extensions or all the currently known extensions (see the
details).virtual
:TRUE
if this is
a virtual class.prototype
:new
for this class with no special
arguments. Don't mess with the prototype object directly.validity
:validObject
.access
:className
:package
:subclasses
:SClassExtension-class
. The list is currently only
filled in when completing the class definition (see the details).versionKey
:"externalptr"
;
eventually will perhaps hold some versioning information, but not
currently used. sealed
:"logical"
; is this
class sealed? If so, no modifications are allowed.
See function setClass
to supply the information in the
class definition.
See Classes for a more basic discussion of class information.