A class that cannot have instances. Abstract classes are helpful in designing a class hierarchy, to contain the common parts of several concrete classes.
One of a class’s superclasses, one of its superclasses’s superclasses, etc. Sometimes, for convenience, ancestor includes the class itself, along with its proper ancestors.
A synonym for subclass.
A class is defined by a description of the information its instances contain and the messages they respond to. Every object is an instance of one and only one class.
A class that can have instances. Most classes are concrete.
Specifies what actions should be taken when an instance
of a class is created. A create method frequently
provides initial slot values or specifies an action to be
performed by the new object. A create message is sent to
each new object by the
create/2 predicate. A create
message is a kind of send message.
One of a class’s subclasses, one of its subclasses’s subclasses, etc. Sometimes the word descendant includes the class itself, along with its proper descendants.
Specifies what actions should be taken when an instance
of a class is destroyed. A destroy message is sent to an
object by the
destroy/1 predicate. A destroy message
is a kind of send message.
Fetching or storing a slot value without sending a message to the object. This should be used with care!
SICStus Objects allows direct access to a class’s slots
only within its method definitions, via the
A message that inquires about some aspect of an object. Typically used to fetch slot values. Get methods are automatically generated for public slots. Get messages are written with the ‘>>’ operator.
The process by which a class’s slots and methods are determined from an ancestor.
The value a slot is initialized to when an object is created. Every slot has a default initial value, which depends upon its type. You may specify different initial values in a class definition.
Another word for object. The word instance draws attention to the class of which the object is an instance.
A method that may be defined differently for each instance of a class. The class may have a default method for this message, which is overridden by installing an instance method for a particular object.
A command to an object to perform an operation or to modify itself, or an inquiry into some aspect of the object. In SICStus Objects, a message is either a get message, a put message or a send message. The syntax for sending a message to an object is
Object Operator Message
where Operator is one of the following:
A class’s implementation of a particular message. You send messages to an object, but you define methods for a class.
A Prolog clause used to define a method for a class. A
method clause has one of
>>/2 as the
principal functor of its head, and it can only appear
within the scope of its class’s definition. A method’s
definition may contain more than one message clause.
A class that is intended to be combined (mixed in) with other classes, via multiple inheritance, to define new subclasses.
When a class names more than one superclass. Typically, it inherits slots and methods from each. In SICStus Objects, two different superclasses should not use the same slot name. And, if a message is defined by more than one superclass, the class definition must specify which method to inherit.
A modifiable data item that holds information and responds to messages. Another word for instance.
A synonym for superclass.
A private slot is, by default, only accessible within methods of the class itself. Not even the descendants of the class may access its private slots, except through the class’s methods. Get and put methods are not automatically generated for a private slot, so it is only accessed via the methods you define. If the visibility of a slot is not specified, it is private, rather than public or protected.
A protected slot is, by default, only accessible within methods of the class itself and its descendants. Get and put methods are not automatically generated for a protected slot, so it is only accessed via the methods you define. If the visibility of a slot is not specified, it is private, rather than public or protected.
protected is similar to
protected in C++.
A public slot is accessible via its own get and put methods, which are generated for it automatically. If no visibility is specified, a slot is private, rather than public or protected.
A message that modifies some aspect of an object. Typically used to store slot values. Put methods are automatically generated for public slots. Put messages are written with the ‘<<’ operator.
The most common sort of message. Used for performing an operation on an object or for performing an action that depends upon an object. Send messages are written with the ‘<-’ operator.
When a method for a class executes a shadowed superclass’s method. This allows a class to put a “wrapper” around its superclass’s method, making it unnecessary to duplicate the method just to make a small extension to it.
When a class defines its own method for a message defined by one of its ancestors, the new method hides or “shadows” the ancestor’s method. The new class’s descendants will inherit its method for that message, rather than its ancestors. That is, a class always inherits the “closer” of two methods for a message.
A part of an instance that holds an individual datum. Like a member of a C struct or a field of a Pascal record.
A class that is a more specific case of a particular class. This is the opposite of superclass. A class does not name its subclasses; they are inferred.
A class that is a more general case of a particular class. Each class lists its superclasses.
A class whose instances are represented as ordinary Prolog terms. The functor of these objects need not be the name of the class, and the arity need not be one.
A slot that can hold any Prolog term.
Specify that a method from a superclass should not be inherited. This is similar to shadowing the superclass’s method, but does not specify a replacement for it.
A slot may be defined to be either
private. By default, if no visibility is
specified, a slot is private.