JavaUnresolvedStringConstant.st
author Claus Gittinger <cg@exept.de>
Thu, 24 Nov 2011 12:53:40 +0100
changeset 2270 e58c2044faa4
parent 2209 c2dffad1824e
child 2353 fa7400d022a0
permissions -rw-r--r--
fixed: #version_SVN ($ to §)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
454
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     1
"
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
454
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     3
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     4
 This software is furnished under a license and may be used
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     5
 only in accordance with the terms of that license and with the
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     6
 inclusion of the above copyright notice.   This software may not
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     7
 be provided or otherwise made available to, or used by, any
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     8
 other person.  No title to or ownership of the software is
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     9
 hereby transferred.
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    10
"
713
75e92ac63bf1 category change
cg
parents: 454
diff changeset
    11
"{ Package: 'stx:libjava' }"
75e92ac63bf1 category change
cg
parents: 454
diff changeset
    12
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    13
JavaUnresolvedConstant subclass:#JavaUnresolvedStringConstant
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    14
	instanceVariableNames:'stringIndex'
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    15
	classVariableNames:''
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    16
	poolDictionaries:''
713
75e92ac63bf1 category change
cg
parents: 454
diff changeset
    17
	category:'Languages-Java-Reader-Support'
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    18
!
083530508d9c intitial checkin
cg
parents:
diff changeset
    19
454
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    20
!JavaUnresolvedStringConstant class methodsFor:'documentation'!
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    21
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    22
copyright
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    23
"
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    24
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
454
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    25
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    26
 This software is furnished under a license and may be used
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    27
 only in accordance with the terms of that license and with the
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    28
 inclusion of the above copyright notice.   This software may not
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    29
 be provided or otherwise made available to, or used by, any
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    30
 other person.  No title to or ownership of the software is
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    31
 hereby transferred.
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    32
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    33
"
454
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    34
! !
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    35
135
098936234135 *** empty log message ***
cg
parents: 90
diff changeset
    36
!JavaUnresolvedStringConstant class methodsFor:'instance creation'!
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    37
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    38
pool:aPool poolIndex:index stringIndex:stringIndex
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    39
    ^ self new 
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    40
        pool:aPool poolIndex:index stringIndex:stringIndex
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    41
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    42
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    43
! !
083530508d9c intitial checkin
cg
parents:
diff changeset
    44
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    45
!JavaUnresolvedStringConstant methodsFor:'accessing'!
37
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    46
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    47
pool:aPool poolIndex:i stringIndex:string_index
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    48
    constantPool := aPool.
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    49
    constantPoolIndex := i.
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    50
    stringIndex := string_index.
37
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    51
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    52
! !
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    53
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    54
!JavaUnresolvedStringConstant methodsFor:'resolving'!
083530508d9c intitial checkin
cg
parents:
diff changeset
    55
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    56
preResolve
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    57
    |jString chars|
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    58
167
77dcbc4b2201 *** empty log message ***
cg
parents: 135
diff changeset
    59
    Java java_lang_String notNil ifTrue:[
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    60
        chars := (constantPool at:stringIndex).
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    61
        chars isString ifFalse:[
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    62
            self halt:'should not happen'
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    63
        ].
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    64
        jString := JavaVM javaStringObjectForString:chars interned:true.
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    65
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    66
"/constantPool owner == (Java at:'java/awt/Container') ifTrue:[
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    67
"/self halt
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    68
"/].
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    69
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    70
        constantPool at:constantPoolIndex put:jString.
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    71
        ^ jString.
37
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    72
    ].
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    73
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    74
    self rememberForResolveWith:'java/lang/String'.
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    75
    ^ self
167
77dcbc4b2201 *** empty log message ***
cg
parents: 135
diff changeset
    76
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    77
    "Modified: / 07-08-1997 / 21:17:23 / cg"
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    78
    "Modified: / 10-08-2011 / 23:28:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    79
! !
083530508d9c intitial checkin
cg
parents:
diff changeset
    80
135
098936234135 *** empty log message ***
cg
parents: 90
diff changeset
    81
!JavaUnresolvedStringConstant class methodsFor:'documentation'!
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    82
083530508d9c intitial checkin
cg
parents:
diff changeset
    83
version
2209
c2dffad1824e changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
    84
    ^ '$Header: /cvs/stx/stx/libjava/JavaUnresolvedStringConstant.st,v 1.10 2011-11-24 11:19:49 cg Exp $'
c2dffad1824e changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
    85
!
c2dffad1824e changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
    86
c2dffad1824e changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
    87
version_CVS
c2dffad1824e changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
    88
    ^ '$Header: /cvs/stx/stx/libjava/JavaUnresolvedStringConstant.st,v 1.10 2011-11-24 11:19:49 cg Exp $'
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    89
!
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    90
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    91
version_SVN
2209
c2dffad1824e changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
    92
    ^ '§Id: JavaUnresolvedStringConstant.st,v 1.9 2011/08/18 18:42:48 vrany Exp §'
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    93
! !