JavaAnnotation.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 24 May 2013 17:55:42 +0100
branchbuiltin-class-support
changeset 2629 cedb88626902
parent 2429 ebece4dcaab9
child 2711 a00302fe5083
permissions -rw-r--r--
Closing branch.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     1
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
     3
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
     4
 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: 2317
diff changeset
     5
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     6
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     8
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    14
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    15
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    16
 [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: 2317
diff changeset
    17
     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: 2317
diff changeset
    18
     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: 2317
diff changeset
    19
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    20
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    21
"{ Package: 'stx:libjava' }"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    22
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    23
Object subclass:#JavaAnnotation
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    24
	instanceVariableNames:'nameIndex name valuesCount values parent'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    25
	classVariableNames:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    26
	poolDictionaries:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    27
	category:'Languages-Java-Reader-Support'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    28
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    29
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    30
!JavaAnnotation class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    31
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    32
copyright
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    33
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    34
 COPYRIGHT (c) 1996-2011 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: 2317
diff changeset
    35
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    36
 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: 2317
diff changeset
    37
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    38
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    39
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    40
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    41
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    45
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    46
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    47
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    48
 [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: 2317
diff changeset
    49
     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: 2317
diff changeset
    50
     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: 2317
diff changeset
    51
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    52
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    53
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    54
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    55
2396
fadc6d7a2f5b Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2353
diff changeset
    56
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    57
!JavaAnnotation class methodsFor:'instance creation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    58
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    59
for:parent
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    60
    "Create & return a new instance for given parent."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    61
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    62
    ^ self basicNew initializeFor:parent
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    63
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    64
    " 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    65
    JavaAnnotation for: nil.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    66
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    67
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    68
    "Modified: / 17-12-2010 / 16:32:46 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    69
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    70
2396
fadc6d7a2f5b Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2353
diff changeset
    71
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    72
!JavaAnnotation methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    73
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    74
constantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    75
 ^parent constantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    76
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    77
    "Created: / 17-12-2010 / 14:21:59 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    78
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    79
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    80
name
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    81
    name isNil ifTrue: [self constantPool at: nameIndex] ifFalse: [^name].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    82
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    83
    "Modified: / 17-12-2010 / 18:01:14 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    84
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    85
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    86
name: something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    87
    name := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    88
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    89
    "Created: / 17-12-2010 / 18:02:30 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    90
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    91
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    92
nameIndex
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    93
    ^ nameIndex
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
nameIndex: something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    97
    nameIndex := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    98
    name := self constantPool at: nameIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    99
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   100
    "Created: / 17-12-2010 / 18:02:14 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   101
    "Modified: / 17-12-2010 / 19:47:41 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   102
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   103
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   104
parent
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   105
    ^ parent
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   106
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   107
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   108
parent:something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   109
    parent := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   110
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   111
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   112
valueAt: anIndex
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   113
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   114
^ values at: anIndex value.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   115
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   116
    "Created: / 17-12-2010 / 14:26:38 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   117
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   118
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   119
values
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   120
    ^ values
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   121
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   122
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   123
values:something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   124
    values := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   125
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   126
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   127
valuesCount
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   128
    ^ valuesCount
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   129
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   130
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   131
valuesCount:something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   132
    valuesCount := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   133
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   134
2396
fadc6d7a2f5b Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2353
diff changeset
   135
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   136
!JavaAnnotation methodsFor:'initialization'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   137
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   138
initialize
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   139
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   140
    values := Dictionary new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   141
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   142
    "Created: / 17-12-2010 / 16:35:08 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   143
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   144
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   145
initializeFor:aParent 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   146
    "Invoked when a new instance is created for aParent."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   147
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   148
    parent := aParent.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   149
    self initialize.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   150
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   151
    "Modified: / 17-12-2010 / 16:33:59 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   152
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   153
2396
fadc6d7a2f5b Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2353
diff changeset
   154
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   155
!JavaAnnotation class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   156
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   157
version_CVS
2396
fadc6d7a2f5b Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2353
diff changeset
   158
    ^ '$Header: /cvs/stx/stx/libjava/JavaAnnotation.st,v 1.5 2013-02-25 11:15:31 vrany Exp $'
2317
d062ed801490 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
   159
!
d062ed801490 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
   160
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   161
version_HG
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   162
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   163
    ^ '$Changeset: <not expanded> $'
2217
172d0e38d498 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   164
!
172d0e38d498 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   165
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   166
version_SVN
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   167
    ^ '§Id§'
2152
1cbdfbcc685c Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 749
diff changeset
   168
! !
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   169