JavaNameAndType2.st
author Claus Gittinger <cg@exept.de>
Thu, 24 Nov 2011 13:02:05 +0100
changeset 2330 b189800c0d92
parent 2320 5045031e8006
child 2353 fa7400d022a0
permissions -rw-r--r--
automatically generated by browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     1
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     3
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     4
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     5
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     6
 Parts of the code written by Claus Gittinger are under following
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     7
 license:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     8
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    14
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    15
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    16
 Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    17
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    18
 Permission is hereby granted, free of charge, to any person
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    19
 obtaining a copy of this software and associated documentation
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    20
 files (the 'Software'), to deal in the Software without
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    21
 restriction, including without limitation the rights to use,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    22
 copy, modify, merge, publish, distribute, sublicense, and/or sell
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    23
 copies of the Software, and to permit persons to whom the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    24
 Software is furnished to do so, subject to the following
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    25
 conditions:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    26
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    27
 The above copyright notice and this permission notice shall be
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    28
 included in all copies or substantial portions of the Software.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    29
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    30
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    31
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    32
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    33
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    34
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    35
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    36
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    37
 OTHER DEALINGS IN THE SOFTWARE.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    38
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    39
 [1] Code written at SWING Research Group contain a signature
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    40
     of one of the above copright owners.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    41
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    42
"{ Package: 'stx:libjava' }"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    43
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    44
Object subclass:#JavaNameAndType2
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    45
	instanceVariableNames:'constantPool nameIndex descriptorIndex nameCache descriptorCache'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    46
	classVariableNames:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    47
	poolDictionaries:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    48
	category:'Languages-Java-Reader-Support-new'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    49
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    50
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    51
!JavaNameAndType2 class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    52
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    53
copyright
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    54
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    55
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    56
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    57
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    58
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    59
 Parts of the code written by Claus Gittinger are under following
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    60
 license:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    61
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    62
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    63
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    64
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    65
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    66
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    67
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    68
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    69
 Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    70
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    71
 Permission is hereby granted, free of charge, to any person
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    72
 obtaining a copy of this software and associated documentation
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    73
 files (the 'Software'), to deal in the Software without
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    74
 restriction, including without limitation the rights to use,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    75
 copy, modify, merge, publish, distribute, sublicense, and/or sell
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    76
 copies of the Software, and to permit persons to whom the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    77
 Software is furnished to do so, subject to the following
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    78
 conditions:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    79
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    80
 The above copyright notice and this permission notice shall be
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    81
 included in all copies or substantial portions of the Software.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    82
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    83
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    84
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    85
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    86
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    87
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    88
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    89
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    90
 OTHER DEALINGS IN THE SOFTWARE.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    91
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    92
 [1] Code written at SWING Research Group contain a signature
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    93
     of one of the above copright owners.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    94
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    95
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    96
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    97
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    98
documentation
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    99
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   100
    I represent NameAndTypeInfo structure found in java constant pool. 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   101
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   102
    [author:]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   103
        Marcel Hlopko <hlopkmar@fel.cvut.cz>
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   104
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   105
    [instance variables:]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   106
        name - string found in constant pool at nameIndex. Represents field or method name.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   107
        descriptor - string found in constant pool at descIndex. Represents field or method type.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   108
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   109
    [class variables:]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   110
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   111
    [see also:]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   112
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   113
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   114
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   115
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   116
!JavaNameAndType2 class methodsFor:'instance creation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   117
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   118
in: aJavaConstantPool withNameAt: arg1 andDescriptorAt: arg2 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   119
    "Create & return a new instance for arg."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   120
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   121
    ^ self basicNew 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   122
        initializeIn: aJavaConstantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   123
        withNameAt: arg1
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   124
        andDescriptorAt: arg2
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   125
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   126
    "Created: / 10-05-2011 / 15:45:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   127
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   128
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   129
!JavaNameAndType2 methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   130
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   131
constantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   132
^constantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   133
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   134
    "Created: / 10-05-2011 / 17:16:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   135
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   136
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   137
constantPool: aJavaConstantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   138
    constantPool := aJavaConstantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   139
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   140
    "Created: / 10-05-2011 / 17:16:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   141
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   142
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   143
descriptor
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   144
    ^constantPool at: descriptorIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   145
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   146
    "Created: / 08-04-2011 / 11:55:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   147
    "Modified: / 12-05-2011 / 18:51:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   148
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   149
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   150
name
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   151
    ^ constantPool at: nameIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   152
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   153
    "Created: / 08-04-2011 / 11:55:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   154
    "Modified: / 12-05-2011 / 18:42:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   155
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   156
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   157
owner
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   158
    ^ constantPool owner.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   159
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   160
    "Created: / 12-05-2011 / 18:43:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   161
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   162
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   163
owner: javaClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   164
    constantPool owner: javaClass.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   165
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   166
    "Created: / 12-05-2011 / 18:43:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   167
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   168
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   169
selector    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   170
    ^ (self name , self descriptor) asSymbol.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   171
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   172
    "Created: / 11-04-2011 / 21:31:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   173
    "Modified: / 12-05-2011 / 18:51:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   174
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   175
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   176
!JavaNameAndType2 methodsFor:'backward compatibility'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   177
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   178
isUnresolved
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   179
^false.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   180
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   181
    "Created: / 13-05-2011 / 18:43:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   182
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   183
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   184
signature
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   185
^self descriptor.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   186
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   187
    "Created: / 13-05-2011 / 18:45:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   188
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   189
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   190
!JavaNameAndType2 methodsFor:'comparing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   191
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   192
= aNameAndType 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   193
    self name ~= aNameAndType name ifTrue: [ ^ false ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   194
    ^ self descriptor = aNameAndType descriptor.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   195
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   196
    "Created: / 08-04-2011 / 11:56:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   197
    "Modified: / 12-05-2011 / 18:44:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   198
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   199
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   200
hash
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   201
    ^ self name hash bitXor: self descriptor hash.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   202
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   203
    "Created: / 08-04-2011 / 11:57:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   204
    "Modified: / 12-05-2011 / 18:44:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   205
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   206
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   207
!JavaNameAndType2 methodsFor:'initialization'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   208
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   209
initializeIn: aJavaConstantPool withNameAt: nameCPIndex andDescriptorAt: descriptorCPIndex 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   210
    nameIndex := nameCPIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   211
    descriptorIndex := descriptorCPIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   212
    constantPool := aJavaConstantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   213
    super initialize.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   214
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   215
    "Created: / 10-05-2011 / 15:45:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   216
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   217
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   218
!JavaNameAndType2 methodsFor:'logging'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   219
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   220
info: arg 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   221
    Transcript show: arg printString.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   222
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   223
    "Created: / 10-05-2011 / 16:50:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   224
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   225
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   226
warning: arg 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   227
    Transcript show: arg printString.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   228
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   229
    "Created: / 10-05-2011 / 15:01:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   230
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   231
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   232
!JavaNameAndType2 methodsFor:'printing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   233
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   234
printString
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   235
    ^ 'JavaNameAndType name=' , self name printString , ' descriptor= ' 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   236
        , self descriptor printString.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   237
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   238
    "Created: / 10-05-2011 / 14:17:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   239
    "Modified: / 12-05-2011 / 18:44:46 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   240
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   241
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   242
!JavaNameAndType2 methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   243
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   244
isJavaNameAndType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   245
    "return true, if given object represents name and type struct in java constant pool"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   246
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   247
    ^ true.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   248
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   249
    "Created: / 10-05-2011 / 12:23:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   250
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   251
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   252
isNewJavaNameAndType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   253
    "only temporary, to know if name and type is old (claus' version) or new (m version)"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   254
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   255
    ^ true.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   256
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   257
    "Created: / 10-05-2011 / 12:24:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   258
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   259
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   260
!JavaNameAndType2 methodsFor:'resolving'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   261
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   262
resolve
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   263
    nameCache := constantPool at: nameIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   264
    descriptorCache := constantPool at: descriptorIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   265
    (nameCache isNil or: [ descriptorCache isNil ]) 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   266
        ifTrue: [ self breakPoint: #mh ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   267
    ^self.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   268
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   269
    "Created: / 18-05-2011 / 13:19:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   270
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   271
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   272
updateClassRefsFrom: oldOwner to: newOwner 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   273
    self owner = oldOwner ifTrue: [
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   274
        self owner: newOwner.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   275
    ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   276
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   277
    "Created: / 10-05-2011 / 16:50:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   278
    "Modified: / 04-06-2011 / 18:40:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   279
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   280
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   281
!JavaNameAndType2 class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   282
2320
5045031e8006 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2232
diff changeset
   283
version
5045031e8006 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2232
diff changeset
   284
    ^ '$Header: /cvs/stx/stx/libjava/JavaNameAndType2.st,v 1.3 2011-11-24 11:55:31 cg Exp $'
5045031e8006 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2232
diff changeset
   285
!
5045031e8006 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2232
diff changeset
   286
2232
b5fd116aef7c added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   287
version_CVS
2320
5045031e8006 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2232
diff changeset
   288
    ^ '$Header: /cvs/stx/stx/libjava/JavaNameAndType2.st,v 1.3 2011-11-24 11:55:31 cg Exp $'
2232
b5fd116aef7c added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   289
!
b5fd116aef7c added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   290
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   291
version_SVN
2232
b5fd116aef7c added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   292
    ^ '§Id: JavaNameAndType2.st,v 1.1 2011/08/18 19:06:53 vrany Exp §'
2152
1cbdfbcc685c Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 749
diff changeset
   293
! !