1731
|
1 |
Metaclass subclass:#PrivateMetaclass
|
|
2 |
instanceVariableNames:'owningClass'
|
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
|
5 |
category:'Kernel-Classes'
|
|
6 |
!
|
|
7 |
|
1737
|
8 |
!PrivateMetaclass class methodsFor:'documentation'!
|
1731
|
9 |
|
|
10 |
documentation
|
|
11 |
"
|
|
12 |
A PrivateMetaclass is much like a regular Metaclass, but it is only visible (known)
|
|
13 |
to some owningClass (which is also true for the PrivateMetaclasses sole instance).
|
|
14 |
|
1755
|
15 |
Its sourceCode, package and revision is forced to be the same as the owning classes'.
|
|
16 |
Therefore, privateClasses delegate some queries to their owning class.
|
1731
|
17 |
|
|
18 |
[author:]
|
|
19 |
Claus Gittinger
|
|
20 |
|
|
21 |
[see also:]
|
|
22 |
Behavior ClassDescription Class Metaclass
|
|
23 |
"
|
|
24 |
! !
|
|
25 |
|
|
26 |
!PrivateMetaclass methodsFor:'accessing'!
|
|
27 |
|
|
28 |
owningClass
|
|
29 |
"return my owningClass"
|
|
30 |
|
|
31 |
^ owningClass
|
|
32 |
|
|
33 |
"Created: 11.10.1996 / 16:55:43 / cg"
|
|
34 |
"Modified: 11.10.1996 / 17:35:13 / cg"
|
|
35 |
!
|
|
36 |
|
|
37 |
setOwningClass:something
|
|
38 |
"set my owningClass - this is not a public entry"
|
|
39 |
|
|
40 |
owningClass := something.
|
|
41 |
|
|
42 |
"Created: 11.10.1996 / 17:11:05 / cg"
|
|
43 |
"Modified: 11.10.1996 / 17:35:24 / cg"
|
|
44 |
! !
|
|
45 |
|
|
46 |
!PrivateMetaclass methodsFor:'queries'!
|
|
47 |
|
|
48 |
isBuiltInClass
|
1755
|
49 |
^ self == PrivateMetaclass
|
1757
|
50 |
!
|
|
51 |
|
|
52 |
package
|
|
53 |
"return my package-id"
|
|
54 |
|
|
55 |
^ owningClass package
|
|
56 |
|
|
57 |
"Created: 15.10.1996 / 19:45:04 / cg"
|
1731
|
58 |
! !
|
|
59 |
|
1738
|
60 |
!PrivateMetaclass class methodsFor:'documentation'!
|
1731
|
61 |
|
|
62 |
version
|
1757
|
63 |
^ '$Header: /cvs/stx/stx/libbasic/PrivateMetaclass.st,v 1.7 1996-10-15 19:37:17 cg Exp $'
|
1731
|
64 |
! !
|