src/JavaNameAndType2.st
author hlopkmar
Wed, 18 May 2011 11:19:08 +0000
branchjk_new_structure
changeset 795 6c81c73755c7
parent 788 bdc1ee670ef9
child 843 83d38f26b481
permissions -rw-r--r--
JavaNameAndType2>>resolve
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     1
"{ Package: 'stx:libjava' }"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     2
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
     3
Object subclass:#JavaNameAndType2
795
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
     4
	instanceVariableNames:'constantPool nameIndex descriptorIndex nameCache descriptorCache'
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     5
	classVariableNames:''
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     6
	poolDictionaries:''
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     7
	category:'Languages-Java-Reader-Support-new'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     8
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
     9
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    10
!JavaNameAndType2 class methodsFor:'documentation'!
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    11
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    12
documentation
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    13
"
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    14
    I represent NameAndTypeInfo structure found in java constant pool. 
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    15
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    16
    [author:]
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    17
        Marcel Hlopko <hlopkmar@fel.cvut.cz>
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    18
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    19
    [instance variables:]
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    20
        name - string found in constant pool at nameIndex. Represents field or method name.
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    21
        descriptor - string found in constant pool at descIndex. Represents field or method type.
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    22
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    23
    [class variables:]
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    24
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    25
    [see also:]
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    26
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    27
"
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    28
! !
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    29
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    30
!JavaNameAndType2 class methodsFor:'instance creation'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    31
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
    32
in: aJavaConstantPool withNameAt: arg1 andDescriptorAt: arg2 
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    33
    "Create & return a new instance for arg."
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
    34
    
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
    35
    ^ self basicNew 
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
    36
        initializeIn: aJavaConstantPool
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
    37
        withNameAt: arg1
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
    38
        andDescriptorAt: arg2
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    39
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
    40
    "Created: / 10-05-2011 / 15:45:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    41
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    42
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    43
!JavaNameAndType2 methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    44
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    45
constantPool
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    46
^constantPool.
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    47
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    48
    "Created: / 10-05-2011 / 17:16:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    49
!
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    50
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    51
constantPool: aJavaConstantPool
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    52
    constantPool := aJavaConstantPool.
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    53
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    54
    "Created: / 10-05-2011 / 17:16:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    55
!
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    56
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    57
descriptor
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    58
    ^constantPool at: descriptorIndex.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    59
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    60
    "Created: / 08-04-2011 / 11:55:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    61
    "Modified: / 12-05-2011 / 18:51:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    62
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    63
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    64
name
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    65
    ^ constantPool at: nameIndex.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    66
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    67
    "Created: / 08-04-2011 / 11:55:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    68
    "Modified: / 12-05-2011 / 18:42:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
761
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
    69
!
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
    70
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    71
owner
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    72
    ^ constantPool owner.
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    73
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    74
    "Created: / 12-05-2011 / 18:43:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    75
!
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
    76
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    77
owner: javaClass
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    78
    constantPool owner: javaClass.
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    79
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    80
    "Created: / 12-05-2011 / 18:43:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    81
!
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    82
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    83
selector    
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    84
    ^ (self name , self descriptor) asSymbol.
761
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
    85
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
    86
    "Created: / 11-04-2011 / 21:31:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
    87
    "Modified: / 12-05-2011 / 18:51:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    88
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    89
787
cae769b9b5c1 added JavaNameAndType2>>isUnresolved - only temporarily
hlopkmar
parents: 777
diff changeset
    90
!JavaNameAndType2 methodsFor:'backward compatibility'!
cae769b9b5c1 added JavaNameAndType2>>isUnresolved - only temporarily
hlopkmar
parents: 777
diff changeset
    91
cae769b9b5c1 added JavaNameAndType2>>isUnresolved - only temporarily
hlopkmar
parents: 777
diff changeset
    92
isUnresolved
cae769b9b5c1 added JavaNameAndType2>>isUnresolved - only temporarily
hlopkmar
parents: 777
diff changeset
    93
^false.
cae769b9b5c1 added JavaNameAndType2>>isUnresolved - only temporarily
hlopkmar
parents: 777
diff changeset
    94
cae769b9b5c1 added JavaNameAndType2>>isUnresolved - only temporarily
hlopkmar
parents: 777
diff changeset
    95
    "Created: / 13-05-2011 / 18:43:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
788
bdc1ee670ef9 added JavaNameAndType2>>signature..
hlopkmar
parents: 787
diff changeset
    96
!
bdc1ee670ef9 added JavaNameAndType2>>signature..
hlopkmar
parents: 787
diff changeset
    97
bdc1ee670ef9 added JavaNameAndType2>>signature..
hlopkmar
parents: 787
diff changeset
    98
signature
bdc1ee670ef9 added JavaNameAndType2>>signature..
hlopkmar
parents: 787
diff changeset
    99
^self descriptor.
bdc1ee670ef9 added JavaNameAndType2>>signature..
hlopkmar
parents: 787
diff changeset
   100
bdc1ee670ef9 added JavaNameAndType2>>signature..
hlopkmar
parents: 787
diff changeset
   101
    "Created: / 13-05-2011 / 18:45:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
787
cae769b9b5c1 added JavaNameAndType2>>isUnresolved - only temporarily
hlopkmar
parents: 777
diff changeset
   102
! !
cae769b9b5c1 added JavaNameAndType2>>isUnresolved - only temporarily
hlopkmar
parents: 777
diff changeset
   103
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   104
!JavaNameAndType2 methodsFor:'comparing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   105
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   106
= aNameAndType 
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   107
    self name ~= aNameAndType name ifTrue: [ ^ false ].
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   108
    ^ self descriptor = aNameAndType descriptor.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   109
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   110
    "Created: / 08-04-2011 / 11:56:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   111
    "Modified: / 12-05-2011 / 18:44:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   112
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   113
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   114
hash
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   115
    ^ self name hash bitXor: self descriptor hash.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   116
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   117
    "Created: / 08-04-2011 / 11:57:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   118
    "Modified: / 12-05-2011 / 18:44:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   119
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   120
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   121
!JavaNameAndType2 methodsFor:'initialization'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   122
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   123
initializeIn: aJavaConstantPool withNameAt: nameCPIndex andDescriptorAt: descriptorCPIndex 
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   124
    nameIndex := nameCPIndex.
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   125
    descriptorIndex := descriptorCPIndex.
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   126
    constantPool := aJavaConstantPool.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   127
    super initialize.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   128
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   129
    "Created: / 10-05-2011 / 15:45:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   130
! !
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   131
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   132
!JavaNameAndType2 methodsFor:'logging'!
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   133
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   134
info: arg 
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   135
    Transcript show: arg printString.
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   136
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   137
    "Created: / 10-05-2011 / 16:50:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   138
!
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   139
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   140
warning: arg 
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   141
    Transcript show: arg printString.
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   142
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   143
    "Created: / 10-05-2011 / 15:01:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   144
! !
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   145
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   146
!JavaNameAndType2 methodsFor:'printing'!
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   147
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   148
printString
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   149
    ^ 'JavaNameAndType name=' , self name printString , ' descriptor= ' 
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   150
        , self descriptor printString.
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   151
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   152
    "Created: / 10-05-2011 / 14:17:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   153
    "Modified: / 12-05-2011 / 18:44:46 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   154
! !
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   155
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   156
!JavaNameAndType2 methodsFor:'queries'!
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   157
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   158
isJavaNameAndType
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   159
    "return true, if given object represents name and type struct in java constant pool"
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   160
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   161
    ^ true.
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   162
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   163
    "Created: / 10-05-2011 / 12:23:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   164
!
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   165
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   166
isNewJavaNameAndType
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   167
    "only temporary, to know if name and type is old (claus' version) or new (m version)"
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   168
    
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   169
    ^ true.
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   170
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   171
    "Created: / 10-05-2011 / 12:24:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   172
! !
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   173
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   174
!JavaNameAndType2 methodsFor:'resolving'!
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   175
795
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   176
resolve
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   177
    nameCache := constantPool at: nameIndex.
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   178
    descriptorCache := constantPool at: descriptorIndex.
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   179
    (nameCache isNil or: [ descriptorCache isNil ]) 
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   180
        ifTrue: [ self breakPoint: #mh ].
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   181
    ^self.
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   182
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   183
    "Created: / 18-05-2011 / 13:19:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   184
!
6c81c73755c7 JavaNameAndType2>>resolve
hlopkmar
parents: 788
diff changeset
   185
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   186
updateClassRefsFrom: oldOwner to: newOwner 
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   187
    self owner = oldOwner ifTrue: [ self owner: newOwner. ].
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   188
    self info: 'updating class refs from: ' , oldOwner printString , ' to ' 
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   189
                , newOwner printString.
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   190
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 772
diff changeset
   191
    "Created: / 10-05-2011 / 16:50:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   192
    "Modified: / 12-05-2011 / 18:43:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   193
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   194
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   195
!JavaNameAndType2 class methodsFor:'documentation'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   196
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   197
version_SVN
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   198
    ^ '$Id$'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   199
! !