| Did you know ... | Search Documentation: |
| Get methods |
-name
or type object of type<-kind
into a class object.
If a class does not exist and the argument is a name, the
pce->exception
with context argument the name of the required class is generated. This
mechanism is used by the autoloader (pce_autoload/2).
->exception <-instance<-get_method
and object<-send_method
operate at the object level and take care of object-level defined
behaviour as well as delegation.
See also object->has_get_method
and object<-get_method.
<-alloc_value
of the corresponding variable
object.variable -initial_value), execute these funcions and assign
the slot values.->initialise
to the new object with the arguments given to this method.->initialise
fails, the exception
initialise_failed is raised using pce->exception.
The context parameter is the (incomplete) object reference.->initialise
succeeds, class<-instance
returns the new object.
NOTE: pce<-instance
is an alternative for creating objects. This gate has two advantages:
type conversion allows you to specify the class-name
rather than the class, and -if the class does not yet exist-, an
exception is raised allowing the class autoloading to create it. See
also class create and new/2
<-convert ->exception ->initialise <-instance -created_messages|int -> variable<-instance_variables,
class<-send_method
or class<-get_method.super is specified, class<-lookup
verifies the super and generates an error message on a mismatch. This
method ensures that
?- get(class(point), instance, 4, 5, P).
Actually returns an instance of the existing class point instead of returning an instance of a new class named point.
subtoo is
@on the freed
instances of class<-sub_classes
are added. See also class<-no_created.-sub_classes