SmallSense__Type.st
changeset 123 1b949542c4b2
parent 103 2d478ebc2456
child 174 3e08d765d86f
--- a/SmallSense__Type.st	Fri Oct 04 09:01:12 2013 +0100
+++ b/SmallSense__Type.st	Sat Oct 05 00:40:01 2013 +0100
@@ -58,10 +58,12 @@
 !
 
 withClass: aClass
+    self assert: aClass notNil.
 
     ^TypeHolder with: (ClassType new klass: aClass)
 
     "Created: / 26-11-2011 / 14:14:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 04-10-2013 / 14:11:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !Type methodsFor:'accessing'!
@@ -109,6 +111,14 @@
 
 !Type methodsFor:'enumerating'!
 
+classes
+    "Return set of all classes that this type represents"
+
+    ^ OrderedCollection streamContents:[:s| self classesDo:[:cls|s nextPut: cls] ].
+
+    "Created: / 04-10-2013 / 13:20:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 classesDo: aBlock
     "Enumerate all classes that this type represents"