12030
|
1 |
"{ Package: 'stx:libbasic' }"
|
|
2 |
|
|
3 |
Object subclass:#CodeComponent
|
|
4 |
instanceVariableNames:'type name properties'
|
|
5 |
classVariableNames:'KnownComponents'
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'System-Support-Projects'
|
|
8 |
!
|
|
9 |
|
|
10 |
!CodeComponent class methodsFor:'documentation'!
|
|
11 |
|
|
12 |
documentation
|
|
13 |
"
|
|
14 |
for visualworks compatibility
|
|
15 |
|
|
16 |
[author:]
|
|
17 |
cg (cg@CG-PC)
|
|
18 |
|
|
19 |
[instance variables:]
|
|
20 |
|
|
21 |
[class variables:]
|
|
22 |
|
|
23 |
[see also:]
|
|
24 |
|
|
25 |
"
|
|
26 |
! !
|
|
27 |
|
|
28 |
!CodeComponent class methodsFor:'initialization'!
|
|
29 |
|
|
30 |
initialize
|
|
31 |
KnownComponents := IdentityDictionary new.
|
|
32 |
! !
|
|
33 |
|
|
34 |
!CodeComponent class methodsFor:'instance creation'!
|
|
35 |
|
|
36 |
type:typeSymbol named:aString
|
|
37 |
^ (KnownComponents at:typeSymbol ifAbsentPut:[Dictionary new])
|
|
38 |
at:aString ifAbsentPut:[self new]
|
|
39 |
|
|
40 |
"
|
|
41 |
CodeComponent type: #package named: 'JavaConnect-Core'
|
|
42 |
"
|
|
43 |
!
|
|
44 |
|
|
45 |
type:typeSymbol named:aString property:propertySymbol value:propertyValue
|
|
46 |
(self type:typeSymbol named:aString) property:propertySymbol value:propertyValue
|
|
47 |
|
|
48 |
"
|
|
49 |
CodeComponent type: #package named: 'JavaConnect-Core' property: #postLoadBlock value: '[:package | (Root bindingFor: #JavaWorld) == nil ifTrue:[JavaConnect.JavaPackage initializeJavaWorld.]]'
|
|
50 |
"
|
|
51 |
! !
|
|
52 |
|
|
53 |
!CodeComponent methodsFor:'accessing'!
|
|
54 |
|
|
55 |
addPropertie:aPropertie
|
|
56 |
"add a Propertie"
|
|
57 |
|
|
58 |
properties isNil ifTrue:[
|
|
59 |
properties := OrderedCollection new.
|
|
60 |
].
|
|
61 |
properties add: aPropertie
|
|
62 |
!
|
|
63 |
|
|
64 |
name
|
|
65 |
^ name
|
|
66 |
!
|
|
67 |
|
|
68 |
name:something
|
|
69 |
name := something.
|
|
70 |
!
|
|
71 |
|
|
72 |
property:aPropertySymbol value:anObject
|
|
73 |
"add a property"
|
|
74 |
|
|
75 |
properties isNil ifTrue:[
|
|
76 |
properties := IdentityDictionary new.
|
|
77 |
].
|
|
78 |
properties at:aPropertySymbol put:anObject
|
|
79 |
!
|
|
80 |
|
|
81 |
type
|
|
82 |
^ type
|
|
83 |
!
|
|
84 |
|
|
85 |
type:something
|
|
86 |
type := something.
|
|
87 |
! !
|
|
88 |
|
|
89 |
!CodeComponent class methodsFor:'documentation'!
|
|
90 |
|
|
91 |
version
|
|
92 |
^ '$Header: /cvs/stx/stx/libbasic/CodeComponent.st,v 1.1 2009-09-25 08:40:44 cg Exp $'
|
|
93 |
! !
|
|
94 |
|
|
95 |
CodeComponent initialize!
|