JavaConstantPool.st
author Claus Gittinger <cg@exept.de>
Fri, 22 Nov 2002 21:14:07 +0100
changeset 2108 ca8c4e7db2e8
parent 749 e898eaeff091
child 2151 c0b6570c6f9b
permissions -rw-r--r--
category change
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
454
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
     1
"
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
     3
              All Rights Reserved
454
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
     4
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
     5
 This software is furnished under a license and may be used
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
     6
 only in accordance with the terms of that license and with the
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
     8
 be provided or otherwise made available to, or used by, any
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
     9
 other person.  No title to or ownership of the software is
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    10
 hereby transferred.
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    11
"
454
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    12
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    13
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    14
713
75e92ac63bf1 category change
cg
parents: 454
diff changeset
    15
"{ Package: 'stx:libjava' }"
75e92ac63bf1 category change
cg
parents: 454
diff changeset
    16
427
a7083b7a8724 *** empty log message ***
cg
parents: 383
diff changeset
    17
Array variableSubclass:#JavaConstantPool
89
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    18
	instanceVariableNames:'owner'
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    19
	classVariableNames:''
89
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    20
	poolDictionaries:''
713
75e92ac63bf1 category change
cg
parents: 454
diff changeset
    21
	category:'Languages-Java-Reader-Support'
89
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    22
!
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    23
454
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    24
!JavaConstantPool class methodsFor:'documentation'!
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    25
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    26
copyright
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    27
"
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    28
 COPYRIGHT (c) 1997 by eXept Software AG
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    29
              All Rights Reserved
454
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    30
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    31
 This software is furnished under a license and may be used
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    32
 only in accordance with the terms of that license and with the
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    33
 inclusion of the above copyright notice.   This software may not
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    34
 be provided or otherwise made available to, or used by, any
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    35
 other person.  No title to or ownership of the software is
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    36
 hereby transferred.
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    37
"
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    38
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    39
38f590639d65 *** empty log message ***
cg
parents: 427
diff changeset
    40
! !
89
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    41
243
d580e27e1b66 added support to compress constantPool data
cg
parents: 206
diff changeset
    42
!JavaConstantPool class methodsFor:'special'!
d580e27e1b66 added support to compress constantPool data
cg
parents: 206
diff changeset
    43
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    44
compressPools
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    45
    "unify all constants"
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    46
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    47
    |strings nameandTypes jStrings|
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    48
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    49
    strings := Set new.
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    50
    nameandTypes := Set new.
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    51
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    52
    self allInstancesDo:[:aPool |
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    53
        aPool keysAndValuesDo:[:idx :aConst |
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    54
            |existing nt|
243
d580e27e1b66 added support to compress constantPool data
cg
parents: 206
diff changeset
    55
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    56
            aConst isString ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    57
                existing := strings elementAt:aConst ifAbsent:nil.
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    58
                existing isNil ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    59
                    strings add:aConst
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    60
                ] ifFalse:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    61
                    aPool at:idx put:existing
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    62
                ]
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    63
            ] ifFalse:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    64
                (aConst isMemberOf:JavaFieldref) ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    65
                    nt := aConst nameandType.
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    66
                    existing := nameandTypes elementAt:nt ifAbsent:nil.
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    67
                    existing isNil ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    68
                        nameandTypes add:nt
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    69
                    ] ifFalse:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    70
                        aConst nameandType:existing
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    71
                    ]
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    72
                ] ifFalse:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    73
                    (aConst isMemberOf:JavaNameandType) ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    74
                        existing := nameandTypes elementAt:aConst ifAbsent:nil.
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    75
                        existing isNil ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    76
                            nameandTypes add:aConst
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    77
                        ] ifFalse:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    78
                            aPool at:idx put:existing
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    79
                        ]
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    80
                    ]
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    81
                ]
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    82
            ]
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    83
        ].
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    84
    ]
243
d580e27e1b66 added support to compress constantPool data
cg
parents: 206
diff changeset
    85
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    86
    "
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    87
     self compressPools
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    88
    "
243
d580e27e1b66 added support to compress constantPool data
cg
parents: 206
diff changeset
    89
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    90
    "Modified: 19.8.1997 / 14:04:25 / cg"
243
d580e27e1b66 added support to compress constantPool data
cg
parents: 206
diff changeset
    91
! !
d580e27e1b66 added support to compress constantPool data
cg
parents: 206
diff changeset
    92
89
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    93
!JavaConstantPool methodsFor:'accessing'!
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    94
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    95
owner
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    96
    "return owner"
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    97
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    98
    ^ owner
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
    99
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   100
    "Created: 28.6.1996 / 21:12:22 / cg"
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   101
!
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   102
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   103
owner:something
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   104
    "set owner"
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   105
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   106
    owner := something.
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   107
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   108
    "Created: 28.6.1996 / 21:12:22 / cg"
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   109
! !
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   110
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   111
!JavaConstantPool methodsFor:'printing & storing'!
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   112
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   113
displayString
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   114
    owner isNil ifTrue:[
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   115
        ^ '*** unowned ConstantPool'
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   116
    ].
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   117
    ^ 'ConstantPool of ' , owner fullName
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   118
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   119
    "Created: 28.6.1996 / 21:13:41 / cg"
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   120
    "Modified: 28.6.1996 / 21:20:26 / cg"
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   121
! !
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   122
171
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   123
!JavaConstantPool methodsFor:'queries'!
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   124
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   125
refersToMethod:aJavaMethod
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   126
    self do:[:constItem |
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   127
        (constItem == aJavaMethod) ifTrue:[^ true].
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   128
        (constItem isMemberOf:JavaMethodref) ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   129
            self halt.
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   130
        ].
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   131
        (constItem isMemberOf:JavaUnresolvedMethodrefConstant) ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   132
            self halt.
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   133
        ]
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   134
    ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   135
    ^ false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   136
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   137
    "Modified: 29.7.1997 / 17:36:49 / cg"
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   138
    "Created: 29.7.1997 / 17:39:19 / cg"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   139
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   140
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   141
refersToMethodNamed:aJavaMethodName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   142
    self do:[:constItem |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   143
        (constItem isKindOf:JavaMethod) ifTrue:[
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   144
            constItem name = aJavaMethodName ifTrue:[^ true].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents: 748
diff changeset
   145
        ] ifFalse:[
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   146
            (constItem isMemberOf:JavaMethodref) ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   147
                constItem name = aJavaMethodName ifTrue:[^ true].
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   148
            ].
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   149
            (constItem isMemberOf:JavaUnresolvedMethodrefConstant) ifTrue:[
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   150
                self halt.
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   151
            ]
171
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   152
        ]
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   153
    ].
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   154
    ^ false
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   155
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   156
    "Created: / 29.7.1997 / 17:39:24 / cg"
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   157
    "Modified: / 16.10.1998 / 01:22:02 / cg"
171
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   158
! !
4669a5e3d44a checkin from browser
cg
parents: 135
diff changeset
   159
203
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   160
!JavaConstantPool methodsFor:'special'!
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   161
252
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   162
classReferencesDo:aBlock
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   163
    self do:[:constItem |
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   164
        constItem isJavaClass ifTrue:[
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   165
            aBlock value:constItem
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   166
        ] 
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   167
    ]
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   168
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   169
    "Modified: / 7.8.1997 / 19:17:38 / cg"
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   170
    "Created: / 4.1.1998 / 00:40:11 / cg"
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   171
!
04b330744577 new javaVM stuff & back to pre-stefans changes
cg
parents: 243
diff changeset
   172
203
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   173
updateClassRefsFrom:oldClass to:newClass
206
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   174
owner == oldClass ifTrue:[
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   175
    self halt.
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   176
    ^ self
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   177
].
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   178
203
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   179
    self keysAndValuesDo:[:index :constItem |
313
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   180
        |nameIndex|
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   181
203
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   182
        constItem == oldClass ifTrue:[
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   183
            self at:index put:newClass
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   184
        ] ifFalse:[
206
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   185
            (constItem isNil
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   186
            or:[constItem isNumber]) ifFalse:[
203
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   187
                constItem isString ifTrue:[
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   188
                    "/ nothing done ...
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   189
                ] ifFalse:[
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   190
                    (constItem isMemberOf:(Java java_lang_String)) ifTrue:[
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   191
                        "/ nothing done ...
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   192
                    ] ifFalse:[
206
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   193
                        constItem isBehavior ifFalse:[
203
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   194
                            constItem updateClassRefsFrom:oldClass to:newClass
206
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   195
                        ] ifTrue:[
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   196
                            constItem isJavaClass ifTrue:[
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   197
                                constItem fullName = oldClass fullName ifTrue:[
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   198
                                    'JAVA: class update by name [in pool].' infoPrintCR.
313
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   199
                                    newClass isNil ifTrue:[
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   200
                                        "/ mhm - must find a slot for the classes name
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   201
                                        nameIndex := -1.
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   202
                                        self 
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   203
                                            at:index
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   204
                                            put:(JavaUnresolvedClassConstant
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   205
                                                    pool:self
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   206
                                                    poolIndex:index
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   207
                                                    nameIndex:nameIndex)
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   208
                                    ] ifFalse:[
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   209
                                        self at:index put:newClass
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   210
                                    ]
206
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   211
                                ]
2200b9091b9e *** empty log message ***
cg
parents: 203
diff changeset
   212
                            ]
203
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   213
                        ]
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   214
                    ]
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   215
                ]
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   216
            ]
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   217
        ]
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   218
    ]
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   219
313
e2488feeb885 *** empty log message ***
cg
parents: 264
diff changeset
   220
    "Modified: / 4.2.1998 / 22:12:03 / cg"
203
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   221
! !
67af98594672 *** empty log message ***
cg
parents: 171
diff changeset
   222
135
098936234135 *** empty log message ***
cg
parents: 89
diff changeset
   223
!JavaConstantPool class methodsFor:'documentation'!
89
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   224
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   225
version
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   226
    ^ '$Header: /cvs/stx/stx/libjava/JavaConstantPool.st,v 1.14 2002-11-22 20:11:58 cg Exp $'
89
3f6da952c7c6 intitial checkin
cg
parents:
diff changeset
   227
! !