10.13.6.6 class_method/1 declaration

Synopsis

:- class_method +Name/+Arity, ... .

Arguments

Name
atom
Arity
integer

Description

Declares that a class's method for send message Name/Arity is an ordinary method, not an instance method.

Used when the class being defined inherits an instance method from a superclass, to allow the class to define a non-instance method for the message. A descendent class may still declare this to be an instance method, so the same message may be an instance method for some classes and an ordinary class method for others.

Must occur within the scope of the class definition. Only applies to send messages.

See Also

instance_method/1


Send feedback on this subject.