150
|
1 |
"{ Package: 'stx:goodies/monticello' }"!
|
|
2 |
|
|
3 |
!Behavior methodsFor:'* monticello'!
|
|
4 |
|
|
5 |
typeOfClass
|
|
6 |
"Answer a symbol uniquely describing the type of the receiver"
|
|
7 |
|
|
8 |
"/ self instSpec = CompiledMethod instSpec ifTrue:[^#compiledMethod]. "Very special!!"
|
|
9 |
(self isSubclassOf:#CompiledCode) ifTrue:[^#compiledMethod]. "Very special!!"
|
|
10 |
self isBytes ifTrue:[^#bytes].
|
|
11 |
(self isWords and:[self isPointers not]) ifTrue:[^#words].
|
|
12 |
(self isLongs and:[self isPointers not]) ifTrue:[^#longs].
|
|
13 |
self isWeakPointers ifTrue:[^#weak].
|
|
14 |
"/ self isWeak ifTrue:[^#weak].
|
|
15 |
self isVariable ifTrue:[^#variable].
|
|
16 |
^#normal.
|
|
17 |
! !
|
136
|
18 |
|
|
19 |
!Class methodsFor:'*monticello'!
|
|
20 |
|
|
21 |
asClassDefinition
|
160
|
22 |
self isLoaded ifFalse:[
|
|
23 |
^ self autoload asClassDefinition
|
|
24 |
].
|
150
|
25 |
^ MCClassDefinition
|
|
26 |
name: self name
|
|
27 |
superclassName: self superclass name
|
|
28 |
category: self category
|
|
29 |
instVarNames: self instVarNames
|
|
30 |
classVarNames: self classVarNames
|
|
31 |
poolDictionaryNames: self poolDictionaryNames
|
|
32 |
classInstVarNames: self class instVarNames
|
|
33 |
type: self typeOfClass
|
|
34 |
comment: (Smalltalk isSmalltalkX ifTrue:[self comment] ifFalse:[ self organization classComment asString ])
|
|
35 |
commentStamp: (Smalltalk isSmalltalkX ifTrue:[nil] ifFalse:[self organization commentStamp])
|
136
|
36 |
! !
|
|
37 |
|
|
38 |
!Class methodsFor:'*monticello'!
|
|
39 |
|
|
40 |
classDefinitions
|
|
41 |
^ Array with: self asClassDefinition
|
|
42 |
! !
|
|
43 |
|
|
44 |
!Class methodsFor:'*monticello'!
|
|
45 |
|
|
46 |
poolDictionaryNames
|
160
|
47 |
^ self sharedPools "/ collect: [:ea | ea name "self environment keyAtIdentityValue: ea"]
|
136
|
48 |
! !
|
|
49 |
|
150
|
50 |
!ClassBuilder methodsFor:'compatibility - squeak'!
|
|
51 |
|
|
52 |
name:newName
|
|
53 |
inEnvironment:aSystemDictionaryOrClass
|
|
54 |
subclassOf:aClass
|
|
55 |
type: type
|
|
56 |
instanceVariableNames: stringOfInstVarNames
|
|
57 |
classVariableNames: stringOfClassVarNames
|
|
58 |
poolDictionaries: stringOfPoolNames
|
|
59 |
category: categoryString
|
|
60 |
|
|
61 |
|variableBoolean wordsBoolean pointersBoolean|
|
|
62 |
|
|
63 |
variableBoolean := wordsBoolean := pointersBoolean := false.
|
|
64 |
type ~~ #normal ifTrue:[
|
|
65 |
self halt:'todo'.
|
|
66 |
].
|
|
67 |
|
|
68 |
self
|
|
69 |
name:newName
|
|
70 |
inEnvironment:aSystemDictionaryOrClass
|
|
71 |
subclassOf:aClass
|
|
72 |
instanceVariableNames:stringOfInstVarNames
|
|
73 |
variable:variableBoolean
|
|
74 |
words:wordsBoolean
|
|
75 |
pointers:pointersBoolean
|
|
76 |
classVariableNames:stringOfClassVarNames
|
|
77 |
poolDictionaries:stringOfPoolNames
|
|
78 |
category:categoryString
|
|
79 |
comment:''
|
|
80 |
changed:false
|
|
81 |
classInstanceVariableNames:''.
|
|
82 |
! !
|
|
83 |
|
136
|
84 |
!Object methodsFor:'*monticello'!
|
|
85 |
|
|
86 |
isConflict
|
|
87 |
^false
|
|
88 |
! !
|
|
89 |
|
|
90 |
!Stream methodsFor:'*monticello'!
|
|
91 |
|
|
92 |
isMessageStream
|
|
93 |
^ false
|
|
94 |
! !
|
|
95 |
|
|
96 |
!String methodsFor:'*monticello'!
|
|
97 |
|
|
98 |
extractNumber
|
|
99 |
^ ('0', self select: [:ea | ea isDigit]) asNumber
|
|
100 |
! !
|
|
101 |
|
150
|
102 |
!UndefinedObject methodsFor:'* monticello'!
|
|
103 |
|
|
104 |
typeOfClass
|
|
105 |
"Necessary to support disjoint class hierarchies."
|
|
106 |
|
|
107 |
^#normal
|
|
108 |
! !
|
|
109 |
|