JavaRef2.st
author Claus Gittinger <cg@exept.de>
Wed, 26 Jun 2019 22:06:15 +0200
branchcvs_MAIN
changeset 3917 94088b7097d5
parent 3431 82790b1e6d54
child 3605 da57f13e6a23
permissions -rw-r--r--
#OTHER by cg +bracketStrings
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3385
58d72cc6d5f6 Replaced old-style `'string' infoPrintCR` logging with new-style `Logger log:'string'` logging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
     1
"{ Encoding: utf8 }"
58d72cc6d5f6 Replaced old-style `'string' infoPrintCR` logging with new-style `Logger log:'string'` logging
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: 3214
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: 2225
diff changeset
     5
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
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: 2225
diff changeset
     7
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3214
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: 2225
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: 2225
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: 2225
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: 2225
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
3385
58d72cc6d5f6 Replaced old-style `'string' infoPrintCR` logging with new-style `Logger log:'string'` logging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
    25
"{ NameSpace: Smalltalk }"
58d72cc6d5f6 Replaced old-style `'string' infoPrintCR` logging with new-style `Logger log:'string'` logging
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:#JavaRef2
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    28
	instanceVariableNames:'resolvedValue constantPool'
749
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
!JavaRef2 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: 3214
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: 2225
diff changeset
    39
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
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: 2225
diff changeset
    41
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3214
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: 2225
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: 2225
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: 2225
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: 2225
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
"
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    58
!
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    59
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    60
documentation
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    61
"
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    62
    An abstract superclass for symbolic references in Java class files.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    63
    A reference is either ''unresolved'' (when `resolvedValue` instvar nil)
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    64
    or ''resolved'' (when ``resolvedValue`` instvar is not nil).
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    65
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    66
    IMPORTANT: The exact physical structure of (sub)instances is known
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    67
    by the VM and therefore changing number, order or meaning of individual
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    68
    instance variables would imply to change the VM accordingly.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    69
    See comments in individual subclasses which instvars are accessed by the VM.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    70
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    71
    IMPORTANT: There's a naming convention:
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    72
    Slots whose name starts with ''resolved'' are valid only after the reference
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    73
    is resolved. Otherwise, they MUST have nil value.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    74
    Other slots MUST be valid once JavaClassReader finishes reading of the 
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    75
    .class file.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    76
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    77
    [author:]
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    78
        Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    79
        Jan Vrany <jan.vrany@fit.cvut.cz>
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    80
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    81
    [instance variables:]
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    82
      !! resolvedValue ..... resolved value whatever it is (class, method, field...).
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    83
                            It also serve as an indicator whether the reference
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    84
                            is unresolved (nil value) or resolved (non-nil value).
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    85
                            !!!!!! Used by the VM !!!!!!
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    86
        constantPool ...... a constant pool to which this reference belongs.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    87
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    88
    [class variables:]
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    89
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    90
    [see also:]
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    91
        Subclasses
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    92
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
    93
"
749
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
!JavaRef2 class methodsFor:'instance creation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    97
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    98
new
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    99
    "Don't call me directly"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   100
3385
58d72cc6d5f6 Replaced old-style `'string' infoPrintCR` logging with new-style `Logger log:'string'` logging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   101
    self shouldNotImplement
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   102
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   103
    "Modified: / 06-12-2011 / 17:02:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
3385
58d72cc6d5f6 Replaced old-style `'string' infoPrintCR` logging with new-style `Logger log:'string'` logging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   104
    "Modified: / 02-03-2015 / 15:55:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
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
!JavaRef2 methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   108
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   109
constantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   110
^constantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   111
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   112
    "Created: / 10-05-2011 / 17:16:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
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
constantPool: aJavaConstantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   116
    constantPool := aJavaConstantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   117
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   118
    "Created: / 10-05-2011 / 17:16:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   119
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   120
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   121
isResolved
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   122
    ^ resolvedValue notNil.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   123
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   124
    "Created: / 08-04-2011 / 11:36:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   125
    "Modified: / 08-04-2011 / 17:39:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   126
    "Modified: / 31-01-2014 / 02:30:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
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
name
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   130
^ self subclassResponsibility.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   131
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   132
    "Created: / 08-04-2011 / 13:53:30 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   133
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   134
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   135
owner
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   136
    ^ constantPool owner.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   137
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   138
    "Modified: / 12-05-2011 / 18:31:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   139
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   140
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   141
owner: javaClass 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   142
    constantPool owner: javaClass.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   143
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   144
    "Modified: / 12-05-2011 / 18:32:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   145
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   146
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   147
resolvedValue
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   148
    ^ resolvedValue
749
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
!JavaRef2 methodsFor:'comparing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   152
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   153
= anotherJavaRef
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   154
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   155
    ^ self subclassResponsibility.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   156
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   157
    "Created: / 08-04-2011 / 12:15:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   158
    "Modified (format): / 31-01-2014 / 03:14:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   159
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   160
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   161
hash
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   162
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   163
    ^ self subclassResponsibility.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   164
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   165
    "Created: / 08-04-2011 / 12:15:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   166
    "Modified (format): / 31-01-2014 / 03:14:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
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
!JavaRef2 methodsFor:'initialization'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   170
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   171
initialize
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   172
    resolvedValue := nil.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   173
    super initialize.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   174
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   175
    "Modified: / 08-04-2011 / 17:39:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   176
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   177
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   178
!JavaRef2 methodsFor:'printing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   179
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   180
displayString
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   181
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   182
    ^self subclassResponsibility
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   183
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   184
    "Created: / 14-08-2011 / 21:18:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   185
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   186
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   187
!JavaRef2 methodsFor:'private - resolving'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   188
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   189
findResolvedValue
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   190
    self findResolvedValue: true.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   191
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   192
    "Modified: / 09-02-2012 / 23:10:09 / mh <hlopik@gmail.com>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   193
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   194
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   195
findResolvedValue: doInit
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   196
    "Resolves reference. If doInit is true, then eventually
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   197
     initialize the class"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   198
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   199
    self subclassResponsibility
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   200
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   201
    "Created: / 09-02-2012 / 23:08:15 / mh <hlopik@gmail.com>"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   202
    "Modified: / 10-04-2012 / 09:31:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   203
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   204
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   205
!JavaRef2 methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   206
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   207
isJavaRef
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   208
"return true if object represents reference in java constant pool"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   209
^ true.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   210
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   211
    "Created: / 08-04-2011 / 16:15:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   212
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   213
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   214
isNewJavaRef
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   215
    "only temporary, to know if ref is old (claus' version) or new (m version)"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   216
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   217
    ^ true.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   218
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   219
    "Created: / 10-05-2011 / 12:20:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   220
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   221
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   222
!JavaRef2 methodsFor:'resolving'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   223
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   224
invalidate
2976
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   225
    "Invalidate reference. Cache will be cleared and next call to resolve will 
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   226
     cause resolving from scratch. Return true if reference was resolved and
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   227
     thus invalidates or false otherwise"
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   228
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   229
    | invalidated |
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   230
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   231
    invalidated := resolvedValue notNil.
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   232
    resolvedValue := nil.
2976
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   233
    ^ invalidated
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   234
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   235
    "Created: / 08-04-2011 / 11:42:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   236
    "Modified: / 08-04-2011 / 17:39:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
3214
c38fcee7b0da Fixes bad bug in Java thread handling that caused memory/resource leak.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2992
diff changeset
   237
    "Modified: / 07-08-2014 / 14:38:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2976
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   238
!
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   239
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   240
invalidateForClass: internalJavaClassName 
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   241
    "Invalidates receiver iff it refers (even indirectly)
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   242
     to a class ref that has been resolved to given class.
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   243
     Returns true, if the receiver has been invalidated,
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   244
     false otherwise"
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   245
    
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   246
    ^ self subclassResponsibility.
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   247
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   248
    "Created: / 08-04-2011 / 15:59:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
a384a02381c0 Update JavaLookup to work with new JIT-compilation scheme...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2969
diff changeset
   249
    "Modified (comment): / 21-02-2012 / 10:20:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   250
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   251
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   252
preResolve
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   253
    "Pre-resolve some caches. Called when the constant pool
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   254
     is loaded. MUST NOT load new nor modify any existing class!!!!!!
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   255
     Ask JV for what this is needed"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   256
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   257
    "Nothing by default"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   258
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   259
    "Created: / 15-10-2012 / 23:13:53 / 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: 2225
diff changeset
   260
!
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   261
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   262
resolve
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   263
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   264
     Do it all method - resolves current reference and returns expected element (JavaMethod, JavaField etc.)
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   265
     Hides implementation details of the way of dealing with invalidation etc. User should not need to call anything
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   266
     else."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   267
    
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   268
     ^ self resolve: true.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   269
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   270
    "Created: / 08-04-2011 / 11:30:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   271
    "Modified: / 23-02-2012 / 17:21:39 / Marcel Hlopko <hlopik@gmail.com>"
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   272
    "Modified (format): / 31-01-2014 / 09:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   273
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   274
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   275
resolve: doClassInit
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   276
    "Do it all method - resolves current reference and returns expected element (JavaMethod, JavaField etc.)
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   277
     If doClassInit is true, resolved class is initialized (if not already)
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   278
     Hides implementation details of the way of dealing with invalidation etc. User should not need to call anything
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   279
     else."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   280
    
2969
38f0943c97a4 Fix in JavaRef2>>#resolve: resolving is now synchronized on class.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   281
    self isResolved ifFalse: [
38f0943c97a4 Fix in JavaRef2>>#resolve: resolving is now synchronized on class.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   282
        constantPool owner synchronized:[  
38f0943c97a4 Fix in JavaRef2>>#resolve: resolving is now synchronized on class.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   283
            self isResolved ifFalse:[
38f0943c97a4 Fix in JavaRef2>>#resolve: resolving is now synchronized on class.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   284
                self findResolvedValue: doClassInit.
38f0943c97a4 Fix in JavaRef2>>#resolve: resolving is now synchronized on class.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   285
                JavaVM flushCachesFor: constantPool owner.
38f0943c97a4 Fix in JavaRef2>>#resolve: resolving is now synchronized on class.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   286
            ].
38f0943c97a4 Fix in JavaRef2>>#resolve: resolving is now synchronized on class.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   287
        ]
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   288
    ].
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   289
    ^ resolvedValue.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   290
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   291
    "Created: / 08-04-2011 / 11:30:21 / 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: 2225
diff changeset
   292
    "Created: / 09-02-2012 / 23:08:15 / mh <hlopik@gmail.com>"
2969
38f0943c97a4 Fix in JavaRef2>>#resolve: resolving is now synchronized on class.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   293
    "Modified: / 23-12-2013 / 23:02:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   294
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   295
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   296
!JavaRef2 methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   297
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   298
isUnresolved
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   299
2992
732f9db2a195 Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2976
diff changeset
   300
    ^resolvedValue isNil
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   301
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   302
    "Created: / 22-05-2011 / 14:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   303
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   304
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   305
!JavaRef2 class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   306
2225
e882c3b261cb added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   307
version_CVS
3431
82790b1e6d54 Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3430
diff changeset
   308
    ^ '$Header: /cvs/stx/stx/libjava/JavaRef2.st,v 1.8 2015-03-20 12:08:00 vrany Exp $'
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   309
!
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   310
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   311
version_HG
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   312
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   313
    ^ '$Changeset: <not expanded> $'
2225
e882c3b261cb added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   314
!
e882c3b261cb added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   315
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   316
version_SVN
2731
13f5be2bf83b Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2711 2678
diff changeset
   317
    ^ 'Id'
2152
1cbdfbcc685c Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 749
diff changeset
   318
! !
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2225
diff changeset
   319