author | Claus Gittinger <cg@exept.de> |
Thu, 24 Nov 2011 13:02:05 +0100 | |
changeset 2330 | b189800c0d92 |
parent 2307 | f23ab78a76c3 |
permissions | -rw-r--r-- |
749 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
3 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
4 |
SWING Research Group, Czech Technical University in Prague |
|
5 |
||
6 |
Parts of the code written by Claus Gittinger are under following |
|
7 |
license: |
|
8 |
||
9 |
This software is furnished under a license and may be used |
|
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
15 |
||
16 |
Parts of the code written at SWING Reasearch Group [1] are MIT licensed: |
|
17 |
||
18 |
Permission is hereby granted, free of charge, to any person |
|
19 |
obtaining a copy of this software and associated documentation |
|
20 |
files (the 'Software'), to deal in the Software without |
|
21 |
restriction, including without limitation the rights to use, |
|
22 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
23 |
copies of the Software, and to permit persons to whom the |
|
24 |
Software is furnished to do so, subject to the following |
|
25 |
conditions: |
|
26 |
||
27 |
The above copyright notice and this permission notice shall be |
|
28 |
included in all copies or substantial portions of the Software. |
|
29 |
||
30 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
31 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
32 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
33 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
34 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
35 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
36 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
37 |
OTHER DEALINGS IN THE SOFTWARE. |
|
38 |
||
39 |
[1] Code written at SWING Research Group contain a signature |
|
40 |
of one of the above copright owners. |
|
41 |
" |
|
42 |
"{ Package: 'stx:libjava' }" |
|
43 |
||
44 |
JavaNode subclass:#JavaMethodNode |
|
45 |
instanceVariableNames:'modifiers type declarator startPosition javadoc' |
|
46 |
classVariableNames:'' |
|
47 |
poolDictionaries:'' |
|
48 |
category:'Languages-Java-AST' |
|
49 |
! |
|
50 |
||
51 |
!JavaMethodNode class methodsFor:'documentation'! |
|
52 |
||
53 |
copyright |
|
54 |
" |
|
55 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
56 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
57 |
SWING Research Group, Czech Technical University in Prague |
|
58 |
||
59 |
Parts of the code written by Claus Gittinger are under following |
|
60 |
license: |
|
61 |
||
62 |
This software is furnished under a license and may be used |
|
63 |
only in accordance with the terms of that license and with the |
|
64 |
inclusion of the above copyright notice. This software may not |
|
65 |
be provided or otherwise made available to, or used by, any |
|
66 |
other person. No title to or ownership of the software is |
|
67 |
hereby transferred. |
|
68 |
||
69 |
Parts of the code written at SWING Reasearch Group [1] are MIT licensed: |
|
70 |
||
71 |
Permission is hereby granted, free of charge, to any person |
|
72 |
obtaining a copy of this software and associated documentation |
|
73 |
files (the 'Software'), to deal in the Software without |
|
74 |
restriction, including without limitation the rights to use, |
|
75 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
76 |
copies of the Software, and to permit persons to whom the |
|
77 |
Software is furnished to do so, subject to the following |
|
78 |
conditions: |
|
79 |
||
80 |
The above copyright notice and this permission notice shall be |
|
81 |
included in all copies or substantial portions of the Software. |
|
82 |
||
83 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
84 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
85 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
86 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
87 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
88 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
89 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
90 |
OTHER DEALINGS IN THE SOFTWARE. |
|
91 |
||
92 |
[1] Code written at SWING Research Group contain a signature |
|
93 |
of one of the above copright owners. |
|
94 |
||
95 |
" |
|
96 |
! ! |
|
97 |
||
98 |
!JavaMethodNode methodsFor:'accessing'! |
|
99 |
||
100 |
declarator |
|
101 |
^ declarator |
|
102 |
! |
|
103 |
||
104 |
declarator:something |
|
105 |
declarator := something. |
|
106 |
! |
|
107 |
||
108 |
javadoc |
|
109 |
^ javadoc |
|
110 |
! |
|
111 |
||
112 |
javadoc:something |
|
113 |
javadoc := something. |
|
114 |
! |
|
115 |
||
116 |
modifiers |
|
117 |
^ modifiers |
|
118 |
! |
|
119 |
||
120 |
modifiers:something |
|
121 |
modifiers := something. |
|
122 |
! |
|
123 |
||
124 |
selector |
|
125 |
| name | |
|
126 |
"/ self halt: 'does not work properly ;('. |
|
127 |
name := self declarator identifier. |
|
128 |
name := name, '('. |
|
129 |
name := name, (self declarator parameterSelector). |
|
130 |
name := name, ')', (self type selector). |
|
131 |
||
132 |
^name. |
|
133 |
||
134 |
"Created: / 13-12-2010 / 14:35:06 / Jan Kurs <kurs.jan@post.cz>" |
|
135 |
"Modified: / 17-12-2010 / 17:47:10 / Jan Kurs <kurs.jan@post.cz>" |
|
136 |
! |
|
137 |
||
138 |
startPosition |
|
139 |
startPosition ifNil: [ startPosition := self determineStartPosition. ]. |
|
140 |
^ startPosition |
|
141 |
||
142 |
"Modified: / 13-12-2010 / 10:35:47 / Jan Kurs <kurs.jan@post.cz>" |
|
143 |
! |
|
144 |
||
145 |
type |
|
146 |
^ type |
|
147 |
! |
|
148 |
||
149 |
type:something |
|
150 |
type := something. |
|
151 |
! ! |
|
152 |
||
153 |
!JavaMethodNode methodsFor:'printing & storing'! |
|
154 |
||
155 |
printOn:aStream |
|
156 |
aStream nextPutAll: self selector. |
|
157 |
||
158 |
"Created: / 17-12-2010 / 17:38:20 / Jan Kurs <kurs.jan@post.cz>" |
|
159 |
! ! |
|
160 |
||
161 |
!JavaMethodNode methodsFor:'private'! |
|
162 |
||
163 |
determineStartPosition |
|
164 |
self javadoc ifNotNil: [ ^ self javadoc lineNumber]. |
|
165 |
(self modifiers size > 0) ifTrue:[ |
|
166 |
^ self modifiers first lineNumber |
|
167 |
]. |
|
168 |
^ self type lineNumber. |
|
169 |
||
170 |
"Created: / 13-12-2010 / 10:34:01 / Jan Kurs <kurs.jan@post.cz>" |
|
171 |
"Modified: / 17-12-2010 / 18:19:30 / Jan Kurs <kurs.jan@post.cz>" |
|
172 |
! ! |
|
173 |
||
174 |
!JavaMethodNode methodsFor:'queries'! |
|
175 |
||
176 |
isMethodDeclaration |
|
177 |
^ true. |
|
178 |
||
179 |
"Created: / 13-12-2010 / 14:34:14 / Jan Kurs <kurs.jan@post.cz>" |
|
180 |
! ! |
|
181 |
||
182 |
!JavaMethodNode class methodsFor:'documentation'! |
|
183 |
||
2307
f23ab78a76c3
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2177
diff
changeset
|
184 |
version |
f23ab78a76c3
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2177
diff
changeset
|
185 |
^ '$Header: /cvs/stx/stx/libjava/Attic/JavaMethodNode.st,v 1.3 2011-11-24 11:55:03 cg Exp $' |
f23ab78a76c3
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2177
diff
changeset
|
186 |
! |
f23ab78a76c3
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2177
diff
changeset
|
187 |
|
2177 | 188 |
version_CVS |
2307
f23ab78a76c3
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2177
diff
changeset
|
189 |
^ '$Header: /cvs/stx/stx/libjava/Attic/JavaMethodNode.st,v 1.3 2011-11-24 11:55:03 cg Exp $' |
2177 | 190 |
! |
191 |
||
749 | 192 |
version_SVN |
2177 | 193 |
^ '§Id: JavaMethodNode.st,v 1.1 2011/08/18 19:06:53 vrany Exp §' |
2152 | 194 |
! ! |