built-in method

forward/1

Description

forward(Message)

User-defined method for forwarding unknown messages sent to an object (using the (::)/2 control construct), automatically called by the runtime when defined. This method is declared in the forwarding built-in protocol as a public predicate. Note that you can make its scope protected or private by using, respectively, protected or private implementation of the forwarding protocol.

Modes and number of proofs

forward(+callable) - zero_or_more

Errors

(none)

Examples

:- object(proxy,
    implements(forwarding),
    ...).

    forward(Message) :-
        % delegate unknown messages to the "real" object
        [real::Message].

See also

[]/1