JavaNameAndType2.st
author Claus Gittinger <cg@exept.de>
Sun, 23 Feb 2020 14:03:15 +0100
branchcvs_MAIN
changeset 3997 5bb44f7e1d20
parent 3431 82790b1e6d54
child 3860 e87f2f1439e9
permissions -rw-r--r--
#REFACTORING by exept class: Java class changed: #dumpConfigOn:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
     1
"{ Encoding: utf8 }"
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
     2
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     3
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
     4
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
     5
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
     6
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
     7
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
     8
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     9
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    10
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    11
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    12
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    13
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    14
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    15
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    16
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    17
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    18
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    19
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    20
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    21
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    22
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    23
"{ Package: 'stx:libjava' }"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    24
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
    25
"{ NameSpace: Smalltalk }"
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
    26
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    27
Object subclass:#JavaNameAndType2
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    28
	instanceVariableNames:'constantPool nameIndex descriptorIndex nameCache descriptorCache'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    29
	classVariableNames:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    30
	poolDictionaries:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    31
	category:'Languages-Java-Reader-Support-new'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    32
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    33
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    34
!JavaNameAndType2 class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    35
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    36
copyright
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    37
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    38
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    39
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    40
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    41
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    42
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    43
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    44
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    45
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    46
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    47
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    48
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    49
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    50
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    51
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    52
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    53
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    54
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
    55
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    56
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    57
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    58
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    59
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    60
!JavaNameAndType2 class methodsFor:'instance creation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    61
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    62
in: aJavaConstantPool withNameAt: arg1 andDescriptorAt: arg2 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    63
    "Create & return a new instance for arg."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    64
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    65
    ^ self basicNew 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    66
        initializeIn: aJavaConstantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    67
        withNameAt: arg1
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    68
        andDescriptorAt: arg2
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    69
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    70
    "Created: / 10-05-2011 / 15:45:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    71
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    72
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    73
!JavaNameAndType2 methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    74
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    75
constantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    76
^constantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    77
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    78
    "Created: / 10-05-2011 / 17:16:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    79
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    80
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    81
constantPool: aJavaConstantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    82
    constantPool := aJavaConstantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    83
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    84
    "Created: / 10-05-2011 / 17:16:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    85
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    86
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    87
descriptor
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    88
    ^constantPool at: descriptorIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    89
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    90
    "Created: / 08-04-2011 / 11:55:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    91
    "Modified: / 12-05-2011 / 18:51:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    92
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    93
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    94
name
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    95
    ^ constantPool at: nameIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    96
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    97
    "Created: / 08-04-2011 / 11:55:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    98
    "Modified: / 12-05-2011 / 18:42:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    99
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   100
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   101
owner
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   102
    ^ constantPool owner.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   103
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   104
    "Created: / 12-05-2011 / 18:43:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   105
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   106
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   107
owner: javaClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   108
    constantPool owner: javaClass.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   109
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   110
    "Created: / 12-05-2011 / 18:43:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   111
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   112
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   113
selector    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   114
    ^ (self name , self descriptor) asSymbol.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   115
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   116
    "Created: / 11-04-2011 / 21:31:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   117
    "Modified: / 12-05-2011 / 18:51:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   118
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   119
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   120
!JavaNameAndType2 methodsFor:'backward compatibility'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   121
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   122
isUnresolved
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   123
^false.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   124
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   125
    "Created: / 13-05-2011 / 18:43:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   126
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   127
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   128
signature
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   129
^self descriptor.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   130
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   131
    "Created: / 13-05-2011 / 18:45:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   132
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   133
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   134
!JavaNameAndType2 methodsFor:'comparing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   135
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   136
= aNameAndType 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   137
    self name ~= aNameAndType name ifTrue: [ ^ false ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   138
    ^ self descriptor = aNameAndType descriptor.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   139
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   140
    "Created: / 08-04-2011 / 11:56:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   141
    "Modified: / 12-05-2011 / 18:44:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   142
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   143
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   144
hash
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   145
    ^ self name hash bitXor: self descriptor hash.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   146
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   147
    "Created: / 08-04-2011 / 11:57:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   148
    "Modified: / 12-05-2011 / 18:44:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   149
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   150
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   151
!JavaNameAndType2 methodsFor:'initialization'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   152
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   153
initializeIn: aJavaConstantPool withNameAt: nameCPIndex andDescriptorAt: descriptorCPIndex 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   154
    nameIndex := nameCPIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   155
    descriptorIndex := descriptorCPIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   156
    constantPool := aJavaConstantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   157
    super initialize.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   158
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   159
    "Created: / 10-05-2011 / 15:45:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   160
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   161
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   162
!JavaNameAndType2 methodsFor:'logging'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   163
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   164
info: arg 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   165
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   166
    Logger log: arg severity: Logger severityINFO facility: 'JVM'
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   167
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   168
    "Created: / 10-05-2011 / 16:50:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   169
    "Modified: / 02-03-2015 / 14:06:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   170
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   171
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   172
warning: arg 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   173
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   174
    Logger log: arg severity: Logger severityWARN facility: 'JVM'
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   175
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   176
    "Created: / 10-05-2011 / 15:01:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   177
    "Modified: / 02-03-2015 / 14:06:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   178
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   179
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   180
!JavaNameAndType2 methodsFor:'printing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   181
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   182
printString
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   183
    ^ 'JavaNameAndType name=' , self name printString , ' descriptor= ' 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   184
        , self descriptor printString.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   185
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   186
    "Created: / 10-05-2011 / 14:17:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   187
    "Modified: / 12-05-2011 / 18:44:46 / 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:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   191
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   192
isJavaNameAndType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   193
    "return true, if given object represents name and type struct in java constant pool"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   194
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   195
    ^ true.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   196
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   197
    "Created: / 10-05-2011 / 12:23:45 / 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
isNewJavaNameAndType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   201
    "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
   202
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   203
    ^ true.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   204
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   205
    "Created: / 10-05-2011 / 12:24:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   206
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   207
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   208
!JavaNameAndType2 methodsFor:'resolving'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   209
2976
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   210
invalidate
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   211
    "Name and type cannot be invalid..."
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   212
    
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   213
    ^ false
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   214
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   215
    "Created: / 20-01-2014 / 10:17:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   216
!
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   217
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   218
invalidateForClass: aSymbol 
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   219
    "Name and type cannot be invalid..."
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   220
    
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   221
    ^ false
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   222
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   223
    "Created: / 22-02-2012 / 20:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   224
!
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   225
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   226
preresolve
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   227
   self resolve
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   228
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   229
    "Created: / 15-10-2012 / 23:09:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   230
!
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   231
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   232
resolve
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   233
    nameCache := constantPool at: nameIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   234
    descriptorCache := constantPool at: descriptorIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   235
    (nameCache isNil or: [ descriptorCache isNil ]) 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   236
        ifTrue: [ self breakPoint: #mh ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   237
    ^self.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   238
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   239
    "Created: / 18-05-2011 / 13:19:13 / 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
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   242
resolve: doClassInit
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   243
   ^ self resolve.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   244
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   245
    "Created: / 18-05-2011 / 13:19:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   246
    "Created: / 23-02-2012 / 17:14:51 / Marcel Hlopko <hlopik@gmail.com>"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   247
!
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   248
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   249
updateClassRefsFrom: oldOwner to: newOwner 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   250
    self owner = oldOwner ifTrue: [
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   251
        self owner: newOwner.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   252
    ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   253
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   254
    "Created: / 10-05-2011 / 16:50:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   255
    "Modified: / 04-06-2011 / 18:40:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   256
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   257
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   258
!JavaNameAndType2 class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   259
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   260
version_CVS
3431
82790b1e6d54 Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3430
diff changeset
   261
    ^ '$Header: /cvs/stx/stx/libjava/JavaNameAndType2.st,v 1.9 2015-03-20 12:08:00 vrany Exp $'
2320
5045031e8006 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2232
diff changeset
   262
!
5045031e8006 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2232
diff changeset
   263
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   264
version_HG
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   265
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   266
    ^ '$Changeset: <not expanded> $'
2232
b5fd116aef7c added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   267
!
b5fd116aef7c added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   268
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   269
version_SVN
2731
13f5be2bf83b Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2711 2678
diff changeset
   270
    ^ 'Id'
2152
1cbdfbcc685c Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 749
diff changeset
   271
! !
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2320
diff changeset
   272