Previous: , Up: obj-exp   [Contents][Index]


10.30.6.25 uninherit/1  declaration

Synopsis

:- uninherit +Class +Op +Name/+Arity, .

Arguments

Class

atom

Op

message_operator

Name

atom

Arity

integer

Description

This prevents the class within whose scope this directive appears from inheriting the Name/Arity method of type Op from ancestor Class.

If Class is unbound, then the specified message is uninherited from all ancestors that define it.

Caveat

Note that if you define a message for your class, then you do not need to uninherit that message from its superclasses: it will automatically be shadowed.

Be careful of the precedences of the message operator and the / operator. You may need to use parentheses.

Examples

:- uninherit someclass << (foo/1),
             someclass >> (foo/1).

This prevents the get and put methods for the slot foo from being inherited from any ancestors of class someclass. In effect, it makes the foo slot a protected slot for this class.

See Also

inherit/1


Send feedback on this subject.