--- a/Annotation.st Mon Sep 05 04:29:43 2011 +0200
+++ b/Annotation.st Mon Sep 05 04:42:25 2011 +0200
@@ -47,7 +47,7 @@
!
Annotation subclass:#Unknown
- instanceVariableNames:'key arguments'
+ instanceVariableNames:'method key arguments'
classVariableNames:''
poolDictionaries:''
privateIn:Annotation
@@ -130,6 +130,24 @@
"Modified: / 02-07-2010 / 16:22:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+method:method key:key arguments:arguments
+
+ ^(self respondsTo: key)
+ ifTrue:
+ [self
+ perform: key
+ withArguments: arguments]
+ ifFalse:
+ [Annotation::Unknown new
+ method: method
+ key: key
+ arguments: arguments]
+
+ "Created: / 19-05-2010 / 16:47:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-07-2010 / 16:22:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 05-09-2011 / 04:39:17 / cg"
+!
+
namespace: aString
^Annotation::NameSpace new nameSpaceName: aString
@@ -275,15 +293,6 @@
"Modified: / 21-08-2011 / 12:43:54 / cg"
!
-keyword
- "Answer the keyword of the pragma (the selector of its message pattern).
- For a pragma defined as <key1: val1 key2: val2> this will answer #key1:key2:."
-
- self subclassResponsibility
-
- "Modified: / 21-08-2011 / 12:45:07 / cg"
-!
-
message
"Answer the message of the receiving pragma."
@@ -306,6 +315,14 @@
"Modified: / 21-08-2011 / 12:45:37 / cg"
! !
+!Annotation methodsFor:'compatibility - squeak'!
+
+keyword
+ ^ self key
+
+ "Created: / 05-09-2011 / 04:34:26 / cg"
+! !
+
!Annotation methodsFor:'initialization'!
setArguments: anArray
@@ -515,6 +532,12 @@
key
^ key
+!
+
+method
+ ^ method
+
+ "Created: / 05-09-2011 / 04:38:33 / cg"
! !
!Annotation::Unknown methodsFor:'initialization'!
@@ -522,6 +545,14 @@
key:keyArg arguments:argumentsArg
key := keyArg.
arguments := argumentsArg.
+!
+
+method:methodArg key:keyArg arguments:argumentsArg
+ method := methodArg.
+ key := keyArg.
+ arguments := argumentsArg.
+
+ "Created: / 05-09-2011 / 04:39:50 / cg"
! !
!Annotation::Unknown methodsFor:'printing & storing'!
@@ -563,7 +594,7 @@
!Annotation class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Annotation.st,v 1.3 2011-08-21 10:47:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Annotation.st,v 1.4 2011-09-05 02:42:25 cg Exp $'
!
version_SVN