--- a/Annotation.st Mon Jul 12 17:20:36 2010 +0100
+++ b/Annotation.st Fri Jul 16 11:21:56 2010 +0100
@@ -25,6 +25,13 @@
privateIn:Annotation
!
+Annotation subclass:#Resource
+ instanceVariableNames:'type value'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:Annotation
+!
+
Annotation subclass:#Unknown
instanceVariableNames:'key arguments'
classVariableNames:''
@@ -71,6 +78,22 @@
^Annotation::NameSpace new nameSpaceName: aString
"Created: / 19-05-2010 / 16:01:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+resource: type
+
+ ^Annotation::Resource new type: type
+
+ "Created: / 16-07-2010 / 11:31:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+resource: type value: value
+
+ ^Annotation::Resource new
+ type: type;
+ value: value
+
+ "Created: / 16-07-2010 / 11:31:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Annotation methodsFor:'accessing'!
@@ -84,9 +107,10 @@
key
- ^#namespace:
+ ^self subclassResponsibility
"Created: / 19-05-2010 / 16:23:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-07-2010 / 11:29:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Annotation methodsFor:'printing & storing'!
@@ -182,6 +206,64 @@
"Modified: / 20-05-2010 / 11:18:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!Annotation::Resource methodsFor:'accessing'!
+
+key
+ "superclass Annotation says that I am responsible to implement this method"
+
+ ^value
+ ifNil:[#resource:]
+ ifNotNil:[#resource:value:]
+
+ "Modified: / 16-07-2010 / 11:30:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+type
+ ^ type
+!
+
+type:something
+ type := something.
+!
+
+value
+ ^ value
+!
+
+value:something
+ value := something.
+! !
+
+!Annotation::Resource methodsFor:'printing & storing'!
+
+storeOn:aStream
+
+ aStream nextPutAll: '(Annotation resource: '.
+ type storeOn: aStream.
+ value ifNotNil:
+ [aStream nextPutAll: ' value: '.
+ value storeOn: aStream].
+ aStream nextPut:$)
+
+ "Modified: / 16-07-2010 / 11:36:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!Annotation::Resource methodsFor:'processing'!
+
+annotatesClass:aClass
+
+ "Nothing to do"
+
+ "Modified: / 16-07-2010 / 11:28:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+annotatesMethod:aMethod
+
+ "Nothing to do"
+
+ "Modified: / 16-07-2010 / 11:28:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!Annotation::Unknown methodsFor:'accessing'!
arguments
@@ -238,5 +320,5 @@
!Annotation class methodsFor:'documentation'!
version_SVN
- ^ '$Id: Annotation.st 10538 2010-07-10 19:45:10Z vranyj1 $'
+ ^ '$Id: Annotation.st 10545 2010-07-16 10:21:56Z vranyj1 $'
! !