JavaUnresolvedStringConstant.st
author cg
Mon, 16 Nov 1998 15:17:54 +0000
changeset 454 38f590639d65
parent 206 2200b9091b9e
child 713 75e92ac63bf1
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
454
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     1
"
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     3
              All Rights Reserved
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     4
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     5
 This software is furnished under a license and may be used
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     6
 only in accordance with the terms of that license and with the
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     8
 be provided or otherwise made available to, or used by, any
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
     9
 other person.  No title to or ownership of the software is
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    10
 hereby transferred.
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    11
"
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    12
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    13
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    14
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    15
JavaUnresolvedConstant subclass:#JavaUnresolvedStringConstant
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    16
	instanceVariableNames:'stringIndex'
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    17
	classVariableNames:''
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    18
	poolDictionaries:''
083530508d9c intitial checkin
cg
parents:
diff changeset
    19
	category:'Java-Reader-Support'
083530508d9c intitial checkin
cg
parents:
diff changeset
    20
!
083530508d9c intitial checkin
cg
parents:
diff changeset
    21
454
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    22
!JavaUnresolvedStringConstant class methodsFor:'documentation'!
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    23
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    24
copyright
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    25
"
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    26
 COPYRIGHT (c) 1997 by eXept Software AG
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    27
              All Rights Reserved
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    28
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    29
 This software is furnished under a license and may be used
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    30
 only in accordance with the terms of that license and with the
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    32
 be provided or otherwise made available to, or used by, any
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    33
 other person.  No title to or ownership of the software is
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    34
 hereby transferred.
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    35
"
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    36
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    37
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    38
! !
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    39
135
098936234135 *** empty log message ***
cg
parents: 90
diff changeset
    40
!JavaUnresolvedStringConstant class methodsFor:'instance creation'!
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    41
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    42
pool:aPool poolIndex:index stringIndex:stringIndex
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    43
    ^ self new 
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    44
        pool:aPool poolIndex:index stringIndex:stringIndex
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    45
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    46
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    47
! !
083530508d9c intitial checkin
cg
parents:
diff changeset
    48
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    49
!JavaUnresolvedStringConstant methodsFor:'accessing'!
37
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    50
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    51
pool:aPool poolIndex:i stringIndex:string_index
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    52
    constantPool := aPool.
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    53
    constantPoolIndex := i.
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    54
    stringIndex := string_index.
37
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    55
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    56
! !
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    57
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    58
!JavaUnresolvedStringConstant methodsFor:'resolving'!
083530508d9c intitial checkin
cg
parents:
diff changeset
    59
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    60
preResolve
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    61
    |jString chars|
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    62
167
77dcbc4b2201 *** empty log message ***
cg
parents: 135
diff changeset
    63
    Java java_lang_String notNil ifTrue:[
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    64
        chars := (constantPool at:stringIndex).
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    65
        chars isString ifFalse:[
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    66
            self halt:'should not happen'
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    67
        ].
206
2200b9091b9e *** empty log message ***
cg
parents: 167
diff changeset
    68
        jString := Java as_String:chars.
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    69
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    70
"/constantPool owner == (Java at:'java/awt/Container') ifTrue:[
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    71
"/self halt
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    72
"/].
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    73
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    74
        constantPool at:constantPoolIndex put:jString.
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    75
        ^ jString.
37
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    76
    ].
34688ddacf17 javaString patching
cg
parents: 1
diff changeset
    77
90
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    78
    self rememberForResolveWith:'java/lang/String'.
918e2740098c resolve rewritten
cg
parents: 37
diff changeset
    79
    ^ self
167
77dcbc4b2201 *** empty log message ***
cg
parents: 135
diff changeset
    80
206
2200b9091b9e *** empty log message ***
cg
parents: 167
diff changeset
    81
    "Modified: 7.8.1997 / 21:17:23 / cg"
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    82
! !
083530508d9c intitial checkin
cg
parents:
diff changeset
    83
135
098936234135 *** empty log message ***
cg
parents: 90
diff changeset
    84
!JavaUnresolvedStringConstant class methodsFor:'documentation'!
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    85
083530508d9c intitial checkin
cg
parents:
diff changeset
    86
version
454
38f590639d65 *** empty log message ***
cg
parents: 206
diff changeset
    87
    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaUnresolvedStringConstant.st,v 1.7 1998/11/16 15:16:23 cg Exp $'
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    88
! !