equal
deleted
inserted
replaced
81 and provide getter protocol for their fields (e.g. firstName, lastName and age in the above example. |
81 and provide getter protocol for their fields (e.g. firstName, lastName and age in the above example. |
82 InlineObjects are immutable (no setters). |
82 InlineObjects are immutable (no setters). |
83 " |
83 " |
84 ! ! |
84 ! ! |
85 |
85 |
86 !InlineObject class methodsFor:'prototype access'! |
86 !InlineObject class methodsFor:'instance creation'! |
87 |
|
88 prototype |
|
89 ^ InlineObjectPrototype |
|
90 ! |
|
91 |
87 |
92 slotNames:names values:slotValues |
88 slotNames:names values:slotValues |
93 "return a new inline object given slot names and slot values" |
89 "return a new inline object given slot names and slot values" |
94 |
90 |
95 |subclass inst| |
91 |subclass inst| |
131 " |
127 " |
132 |
128 |
133 "Created: / 21-01-2019 / 13:15:46 / Claus Gittinger" |
129 "Created: / 21-01-2019 / 13:15:46 / Claus Gittinger" |
134 ! ! |
130 ! ! |
135 |
131 |
|
132 !InlineObject class methodsFor:'prototype access'! |
|
133 |
|
134 prototype |
|
135 ^ InlineObjectPrototype |
|
136 ! ! |
|
137 |
136 !InlineObject methodsFor:'printing & storing'! |
138 !InlineObject methodsFor:'printing & storing'! |
137 |
139 |
138 storeOn:aStream |
140 storeOn:aStream |
139 aStream nextPutAll:'#{'. |
141 aStream nextPutAll:'#{'. |
140 self class allInstVarNames keysAndValuesDo:[:i :nm | |
142 self class allInstVarNames keysAndValuesDo:[:i :nm | |