JavaUnresolvedNameandTypeConstant.st
author Claus Gittinger <cg@exept.de>
Thu, 22 Dec 2005 18:00:03 +0100
changeset 2125 cfa7b540ebf1
parent 2108 ca8c4e7db2e8
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
454
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
     1
"
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
     3
              All Rights Reserved
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
     4
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
     5
 This software is furnished under a license and may be used
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
     6
 only in accordance with the terms of that license and with the
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
     8
 be provided or otherwise made available to, or used by, any
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
     9
 other person.  No title to or ownership of the software is
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    10
 hereby transferred.
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    11
"
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    12
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    13
38f590639d65 *** empty log message ***
cg
parents: 135
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:#JavaUnresolvedNameandTypeConstant
90
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    18
	instanceVariableNames:'nameIndex signatureIndex'
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    19
	classVariableNames:''
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: 135
diff changeset
    24
!JavaUnresolvedNameandTypeConstant class methodsFor:'documentation'!
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    25
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    26
copyright
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    27
"
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    28
 COPYRIGHT (c) 1997 by eXept Software AG
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    29
              All Rights Reserved
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    30
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    31
 This software is furnished under a license and may be used
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    32
 only in accordance with the terms of that license and with the
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    33
 inclusion of the above copyright notice.   This software may not
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    34
 be provided or otherwise made available to, or used by, any
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    35
 other person.  No title to or ownership of the software is
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    36
 hereby transferred.
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    37
"
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    38
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    39
38f590639d65 *** empty log message ***
cg
parents: 135
diff changeset
    40
! !
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    41
135
098936234135 *** empty log message ***
cg
parents: 93
diff changeset
    42
!JavaUnresolvedNameandTypeConstant class methodsFor:'instance creation'!
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    43
90
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    44
pool:aPool poolIndex:slotIndex nameIndex:name_index signatureIndex:signature_index
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    45
    ^ self new
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    46
        pool:aPool poolIndex:slotIndex nameIndex:name_index signatureIndex:signature_index
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    47
! !
083530508d9c intitial checkin
cg
parents:
diff changeset
    48
083530508d9c intitial checkin
cg
parents:
diff changeset
    49
!JavaUnresolvedNameandTypeConstant methodsFor:'accessing'!
083530508d9c intitial checkin
cg
parents:
diff changeset
    50
90
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    51
pool:aPool poolIndex:slotIndex nameIndex:name_index signatureIndex:signature_index 
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    52
    constantPool := aPool.
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    53
    constantPoolIndex := slotIndex.
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    54
    nameIndex := name_index.
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    55
    signatureIndex := signature_index
083530508d9c intitial checkin
cg
parents:
diff changeset
    56
083530508d9c intitial checkin
cg
parents:
diff changeset
    57
    "Created: 15.4.1996 / 16:14:39 / cg"
083530508d9c intitial checkin
cg
parents:
diff changeset
    58
! !
083530508d9c intitial checkin
cg
parents:
diff changeset
    59
083530508d9c intitial checkin
cg
parents:
diff changeset
    60
!JavaUnresolvedNameandTypeConstant methodsFor:'resolving'!
083530508d9c intitial checkin
cg
parents:
diff changeset
    61
90
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    62
preResolve
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    63
    |name signature ref|
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    64
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    65
    name := (constantPool at:nameIndex).
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    66
    name isString ifFalse:[
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    67
        name := name preResolve.
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    68
    ].
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    69
    signature := (constantPool at:signatureIndex).
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    70
    signature isString ifFalse:[
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    71
        signature := signature preResolve.
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    72
    ].
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    73
    (name isString and:[signature isString]) ifTrue:[
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    74
        ref := JavaNameandType name:name signature:signature.
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    75
        constantPool at:constantPoolIndex put:ref.
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    76
        ^ ref
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    77
    ].
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    78
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    79
    self halt:'should be resolvable'.
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    80
    ^ self
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    81
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    82
    "Created: 15.4.1996 / 16:15:53 / cg"
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    83
    "Modified: 15.4.1996 / 16:27:33 / cg"
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    84
! !
918e2740098c resolve rewritten
cg
parents: 1
diff changeset
    85
135
098936234135 *** empty log message ***
cg
parents: 93
diff changeset
    86
!JavaUnresolvedNameandTypeConstant class methodsFor:'documentation'!
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    87
083530508d9c intitial checkin
cg
parents:
diff changeset
    88
version
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 748
diff changeset
    89
    ^ '$Header: /cvs/stx/stx/libjava/Attic/JavaUnresolvedNameandTypeConstant.st,v 1.6 2002-11-22 20:11:38 cg Exp $'
1
083530508d9c intitial checkin
cg
parents:
diff changeset
    90
! !