src/JavaClassContentRef2.st
author vranyj1
Tue, 26 Jul 2011 16:31:02 +0000
branchjk_new_structure
changeset 877 f5a5b93e1c78
parent 806 7d1f2ba6d2df
child 915 cf0d328465c2
permissions -rw-r--r--
Cleanup phase 1 - Added #copyright method to all classes - removed JavaClassReader2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
877
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
     1
"
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
     3
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
     4
                            SWING Research Group, Czech Technical University in Prague
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
     5
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
     6
 Parts of the code written by Claus Gittinger are under following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
     7
 license:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
     8
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
     9
 This software is furnished under a license and may be used
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    10
 only in accordance with the terms of that license and with the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    12
 be provided or otherwise made available to, or used by, any
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    13
 other person.  No title to or ownership of the software is
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    14
 hereby transferred.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    15
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    16
 Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    17
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    18
 Permission is hereby granted, free of charge, to any person
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    19
 obtaining a copy of this software and associated documentation
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    20
 files (the 'Software'), to deal in the Software without
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    21
 restriction, including without limitation the rights to use,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    22
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    23
 copies of the Software, and to permit persons to whom the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    24
 Software is furnished to do so, subject to the following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    25
 conditions:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    26
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    27
 The above copyright notice and this permission notice shall be
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    28
 included in all copies or substantial portions of the Software.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    29
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    30
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    31
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    32
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    33
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    34
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    35
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    36
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    37
 OTHER DEALINGS IN THE SOFTWARE.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    38
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    39
 [1] Code written at SWING Research Group contain a signature
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    40
     of one of the above copright owners.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    41
"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    42
"{ Package: 'stx:libjava' }"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    43
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    44
JavaRef2 subclass:#JavaClassContentRef2
794
9635f32d1723 implemented deeper caching in new resolving refs to help keeping C-code lean and clean
hlopkmar
parents: 778
diff changeset
    45
	instanceVariableNames:'classRefIndex nameAndTypeIndex classCache nameAndTypeCache'
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    46
	classVariableNames:''
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    47
	poolDictionaries:''
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    48
	category:'Languages-Java-Reader-Support-new'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    49
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    50
877
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    51
!JavaClassContentRef2 class methodsFor:'documentation'!
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    52
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    53
copyright
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    54
"
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    55
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    56
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    57
                            SWING Research Group, Czech Technical University in Prague
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    58
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    59
 Parts of the code written by Claus Gittinger are under following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    60
 license:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    61
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    62
 This software is furnished under a license and may be used
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    63
 only in accordance with the terms of that license and with the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    64
 inclusion of the above copyright notice.   This software may not
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    65
 be provided or otherwise made available to, or used by, any
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    66
 other person.  No title to or ownership of the software is
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    67
 hereby transferred.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    68
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    69
 Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    70
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    71
 Permission is hereby granted, free of charge, to any person
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    72
 obtaining a copy of this software and associated documentation
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    73
 files (the 'Software'), to deal in the Software without
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    74
 restriction, including without limitation the rights to use,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    75
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    76
 copies of the Software, and to permit persons to whom the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    77
 Software is furnished to do so, subject to the following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    78
 conditions:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    79
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    80
 The above copyright notice and this permission notice shall be
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    81
 included in all copies or substantial portions of the Software.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    82
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    83
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    84
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    85
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    86
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    87
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    88
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    89
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    90
 OTHER DEALINGS IN THE SOFTWARE.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    91
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    92
 [1] Code written at SWING Research Group contain a signature
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    93
     of one of the above copright owners.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    94
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    95
"
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 806
diff changeset
    96
! !
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
    97
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    98
!JavaClassContentRef2 class methodsFor:'instance creation'!
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
    99
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   100
in: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex 
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   101
    ^ self basicNew 
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   102
        initializeIn: aJavaConstantPool
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   103
        withNameAndTypeAt: nameAndTypeCPIndex
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   104
        andClassAt: classRefCPIndex.
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   105
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   106
    "Created: / 12-05-2011 / 18:36:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   107
! !
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   108
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   109
!JavaClassContentRef2 methodsFor:'accessing'!
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   110
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   111
classRef
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   112
    ^ constantPool at: classRefIndex.
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   113
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   114
    "Modified: / 12-05-2011 / 18:38:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   115
!
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   116
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   117
descriptor
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   118
    ^ self nameAndType descriptor.
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   119
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   120
    "Created: / 08-04-2011 / 15:08:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   121
    "Modified: / 12-05-2011 / 18:39:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   122
!
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   123
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   124
name
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   125
    ^ self nameAndType name.
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   126
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   127
    "Created: / 08-04-2011 / 13:54:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   128
    "Modified: / 12-05-2011 / 18:39:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
761
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   129
!
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   130
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   131
nameAndType
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   132
    ^ constantPool at: nameAndTypeIndex.
761
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   133
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   134
    "Created: / 11-04-2011 / 19:57:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   135
    "Modified: / 12-05-2011 / 18:39:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
761
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   136
!
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   137
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   138
selector
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   139
    ^ self nameAndType selector.
761
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   140
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   141
    "Created: / 11-04-2011 / 20:38:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   142
    "Modified: / 12-05-2011 / 18:39:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
806
7d1f2ba6d2df fixed lookup of fields.. at least I hope so :)
hlopkmar
parents: 794
diff changeset
   143
!
7d1f2ba6d2df fixed lookup of fields.. at least I hope so :)
hlopkmar
parents: 794
diff changeset
   144
7d1f2ba6d2df fixed lookup of fields.. at least I hope so :)
hlopkmar
parents: 794
diff changeset
   145
signature
7d1f2ba6d2df fixed lookup of fields.. at least I hope so :)
hlopkmar
parents: 794
diff changeset
   146
    ^ self nameAndType signature.
7d1f2ba6d2df fixed lookup of fields.. at least I hope so :)
hlopkmar
parents: 794
diff changeset
   147
7d1f2ba6d2df fixed lookup of fields.. at least I hope so :)
hlopkmar
parents: 794
diff changeset
   148
    "Created: / 20-05-2011 / 17:10:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   149
! !
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   150
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   151
!JavaClassContentRef2 methodsFor:'comparing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   152
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   153
= anotherJavaRef
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   154
    "superclass JavaRef2 says that I am responsible to implement this method"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   155
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   156
    ^ self shouldImplement
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   157
!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   158
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   159
hash
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   160
    "superclass JavaRef2 says that I am responsible to implement this method"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   161
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   162
    ^ self shouldImplement
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   163
! !
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   164
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   165
!JavaClassContentRef2 methodsFor:'initialization'!
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   166
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   167
initializeIn: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex    
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   168
    constantPool := aJavaConstantPool.
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   169
    classRefIndex := classRefCPIndex.
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   170
    nameAndTypeIndex := nameAndTypeCPIndex.
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   171
    super initialize.
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   172
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   173
    "Created: / 12-05-2011 / 18:37:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   174
! !
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   175
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   176
!JavaClassContentRef2 methodsFor:'printing'!
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   177
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   178
printString
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   179
    ^ 'JavaClassContentRef: class=[' , self classRef printString , '] name=[' 
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   180
        , self nameAndType printString , ']'.
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   181
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   182
    "Created: / 10-05-2011 / 14:15:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   183
    "Modified: / 12-05-2011 / 18:40:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   184
! !
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   185
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   186
!JavaClassContentRef2 methodsFor:'resolving'!
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   187
761
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   188
invalidate
778
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   189
    self classRef invalidate.    
794
9635f32d1723 implemented deeper caching in new resolving refs to help keeping C-code lean and clean
hlopkmar
parents: 778
diff changeset
   190
    classCache := nil.
9635f32d1723 implemented deeper caching in new resolving refs to help keeping C-code lean and clean
hlopkmar
parents: 778
diff changeset
   191
    nameAndTypeCache := nil.
771
fb8026dda011 Merged with /trunk
vranyj1
parents: 761
diff changeset
   192
    super invalidate.
761
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   193
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   194
    "Created: / 13-04-2011 / 12:21:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
794
9635f32d1723 implemented deeper caching in new resolving refs to help keeping C-code lean and clean
hlopkmar
parents: 778
diff changeset
   195
    "Modified: / 18-05-2011 / 12:41:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
761
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   196
!
43e017ec7958 Merged with /branches/jk
vranyj1
parents: 758
diff changeset
   197
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   198
invalidateForClass: internalJavaClassName 
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   199
    "Invalidate (means call invalidate) reference if it has something to do with given class (e.g Class named internalJavaClassName was unloaded).
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   200
     Return true, if reference was invalidated."
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   201
    
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   202
    (self classRef invalidateForClass: internalJavaClassName) 
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   203
        ifTrue: 
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   204
            [ self invalidate.
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   205
            ^ true ].
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   206
    ^ false.
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   207
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 772
diff changeset
   208
    "Modified: / 12-05-2011 / 18:40:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
758
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   209
! !
be8e84381ce0 Merged with /branches/jk
vranyj1
parents: 752
diff changeset
   210
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   211
!JavaClassContentRef2 class methodsFor:'documentation'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   212
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   213
version_SVN
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   214
    ^ '$Id$'
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   215
! !