method - Factor Documentation

method


Vocabulary
generic

Class description
The class of method bodies, which are words with special word properties set.

Definition
USING: kernel words ;

IN: generic

PREDICATE: method < word "method-generic" word-prop >boolean ;


Methods
USING: compiler generic words ;

M: method combinator? "method-generic" word-prop combinator? ;


USING: generic kernel words ;

M: method crossref? "forgotten" word-prop not ;


USING: definitions generic kernel ;

M: method definer drop \ M: \ ; ;


USING: classes.private definitions generic kernel words ;

M: method forget*
dup "forgotten" word-prop
[ drop ] [
[
dup default-method?
[ drop ] [
[
[ "method-class" word-prop ]
[ "method-generic" word-prop ] bi
2dup ?lookup-method
] keep eq? [
[ ~quotation~ with-methods ]
[ ~quotation~ with-implementors ] 2bi
reset-caches
] [ 2drop ] if
] if
] [ M\ method forget* (call-next-method) ] bi
] if ;


USING: compiler generic words ;

M: method no-compile? "method-generic" word-prop no-compile? ;


USING: generic words ;

M: method parent-word "method-generic" word-prop ;


USING: generic kernel prettyprint.backend prettyprint.custom
prettyprint.sections words ;

M: method pprint*
<block
[ \ M\ pprint-word "method-class" word-prop pprint* ]
[ "method-generic" word-prop pprint-word ] bi block> ;


USING: generic tools.crossref words ;

M: method smart-usage "method-generic" word-prop smart-usage ;


USING: generic kernel prettyprint.backend see words ;

M: method synopsis*
[ definer. ] [ "method-class" word-prop pprint-class ]
[ "method-generic" word-prop pprint-word ] tri ;

AltStyle によって変換されたページ (->オリジナル) /