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