--- a/Annotation.st Mon Oct 29 17:05:17 2012 +0000
+++ b/Annotation.st Mon Oct 29 22:07:56 2012 +0000
@@ -53,6 +53,29 @@
other person. No title to or ownership of the software is
hereby transferred.
"
+!
+
+documentation
+"
+ I represent an occurrence of a pragma in a compiled method.
+ A pragma is a literal message pattern that occurs between angle brackets at the start of a method after any temporaries.
+ A common example is the primitive pragma:
+ <primitive: 123 errorCode: 'errorCode'>
+ but you can add your own and use them as metadata attached to a method.
+ Because pragmas are messages one can browse senders and implementors and perform them.
+ One can query a method for its pragmas by sending it the pragmas message, which answers an Array of instances of me,
+ one for each pragma in the method.
+ I can provide information about the defining class, method, its selector,
+ as well as the information about the pragma keyword and its arguments. See the two 'accessing' protocols for details.
+ 'accessing-method' provides information about the method the pragma is found in,
+ while 'accessing-pragma' is about the pragma itself.
+ Instances are retrieved using one of the pragma search methods of the 'finding' protocol on the class side.
+ To browse all methods with pragmas in the system evaluate
+ SystemNavigation default browseAllSelect: [:m| m pragmas notEmpty]
+ in ST/X: Smalltalk browseAllSelect: [:m| m pragmas notEmpty]
+ and to browse all nonprimitive methods with pragmas evaluate
+ SystemNavigation default browseAllSelect: [:m| m primitive isZero and: [m pragmas notEmpty]]
+"
! !
!Annotation class methodsFor:'initialization'!
@@ -634,15 +657,15 @@
!Annotation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Annotation.st,v 1.10 2012/07/26 21:26:14 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Annotation.st,v 1.12 2012/10/29 10:25:12 cg Exp $'
!
version_CVS
- ^ '§Header: /cvs/stx/stx/libbasic/Annotation.st,v 1.10 2012/07/26 21:26:14 cg Exp §'
+ ^ '§Header: /cvs/stx/stx/libbasic/Annotation.st,v 1.12 2012/10/29 10:25:12 cg Exp §'
!
version_SVN
- ^ '$Id: Annotation.st 10844 2012-09-07 16:24:32Z vranyj1 $'
+ ^ '$Id: Annotation.st 10858 2012-10-29 22:07:56Z vranyj1 $'
! !
Annotation initialize!