Skip to content

Commit 8dce0f2

Browse files
committed
Add documentation for :methods
1 parent c2d1747 commit 8dce0f2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

doc/jlatex/jobjects.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ \subsection{基本クラス}
242242
このリストに{\bf assoc}を適用することにより、スロットの詳細値が得られる。
243243
しかしながら、それらを変更することはできない。}
244244

245+
\methoddesc{:methods}{\&optional subname}{
246+
このオブジェクトから呼べる全てのメソッドのリストを返す。
247+
{\em subname}を指定すると、メソッド名のなかにそれを含むメソッドのみ返す。}
248+
245249
\classdesc{propertied-object}{object}
246250
{plist}
247251
{property-listを持つオブジェクトを定義する。

lisp/l/object.l

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
(push (cons (elt vars i) (slot self (class self) i)) slots))
2828
(nreverse slots)))
2929
(:methods (&optional (pattern ""))
30+
"(self class &optional (pattern \"\"))
31+
Returns the list of all methods callable by the object. If pattern is given, returns only methods with names that include pattern."
3032
(mapcan #'cadr (send (class self) :all-method-names pattern)))
3133
;; (:all-methods () (send (class self) :all-method-names))
3234
(:super () (send (class self) :super))

0 commit comments

Comments
 (0)