author | Claus Gittinger <cg@exept.de> |
Tue, 09 Jul 2019 20:49:07 +0200 | |
changeset 4458 | abe7565c10fb |
parent 4209 | 8db1fbb0e63b |
permissions | -rw-r--r-- |
798 | 1 |
" |
2 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
957 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
4209 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
782 | 16 |
ClassChange subclass:#ClassPrimitiveChange |
17 |
instanceVariableNames:'' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'System-Changes' |
|
21 |
! |
|
22 |
||
798 | 23 |
!ClassPrimitiveChange class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
||
2164 | 38 |
! |
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
Abstract superclass for all primitive code changes |
|
43 |
" |
|
798 | 44 |
! ! |
782 | 45 |
|
4209 | 46 |
!ClassPrimitiveChange class methodsFor:'queries'! |
47 |
||
48 |
isAbstract |
|
49 |
"Return if this class is an abstract class. |
|
50 |
True is returned here for myself only; false for subclasses. |
|
51 |
Abstract subclasses must redefine this again." |
|
52 |
||
53 |
^ self == ClassPrimitiveChange. |
|
54 |
! ! |
|
55 |
||
782 | 56 |
!ClassPrimitiveChange methodsFor:'accessing'! |
57 |
||
58 |
class:aClass source:newSource |
|
1470 | 59 |
self assert:(newSource isString). |
1286 | 60 |
|
61 |
className := aClass name. |
|
782 | 62 |
source := newSource |
63 |
||
64 |
"Created: 3.12.1995 / 14:02:40 / cg" |
|
65 |
"Modified: 3.12.1995 / 14:06:33 / cg" |
|
66 |
! ! |
|
67 |
||
2370 | 68 |
!ClassPrimitiveChange methodsFor:'applying'! |
69 |
||
70 |
apply |
|
71 |
"apply the change" |
|
72 |
||
73 |
|class| |
|
74 |
||
75 |
class := self changeClass. |
|
76 |
class isNil ifTrue:[ |
|
77 |
self error:('Cannot apply change for missing class: ' , className) mayProceed:true. |
|
78 |
^ self |
|
79 |
]. |
|
80 |
class autoload. "Most changes cannot be applied to unloaded classes" |
|
81 |
Class nameSpaceQuerySignal answer:self nameSpace do:[ |
|
82 |
self privateApply |
|
83 |
]. |
|
84 |
||
85 |
"Created: / 28-06-2011 / 22:58:53 / cg" |
|
86 |
! |
|
87 |
||
88 |
privateApply |
|
89 |
self subclassResponsibility |
|
90 |
||
91 |
"Created: / 28-06-2011 / 22:58:59 / cg" |
|
92 |
! ! |
|
93 |
||
798 | 94 |
!ClassPrimitiveChange methodsFor:'comparing'! |
95 |
||
96 |
sameAs:changeB |
|
97 |
"return true, if the given change represents the same change as the receiver." |
|
98 |
||
99 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
|
100 |
^ self sameSourceAs:changeB |
|
101 |
||
102 |
! ! |
|
103 |
||
3501
2ec70319140a
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
2370
diff
changeset
|
104 |
!ClassPrimitiveChange methodsFor:'testing'! |
782 | 105 |
|
106 |
isPrimitiveChange |
|
107 |
^ true |
|
108 |
! ! |
|
109 |
||
110 |
!ClassPrimitiveChange class methodsFor:'documentation'! |
|
111 |
||
112 |
version |
|
4209 | 113 |
^ '$Header$' |
2370 | 114 |
! |
115 |
||
116 |
version_CVS |
|
4209 | 117 |
^ '$Header$' |
782 | 118 |
! ! |
3501
2ec70319140a
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
2370
diff
changeset
|
119 |