Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Java VM does not boot at this point.
"
COPYRIGHT (c) 1996-2011 by Claus Gittinger
New code and modifications done at SWING Research Group [1]:
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
SWING Research Group, Czech Technical University in Prague
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
[1] Code written at SWING Research Group contains a signature
of one of the above copright owners. For exact set of such code,
see the differences between this version and version stx:libjava
as of 1.9.2010
"
"{ Package: 'stx:libjava/tools' }"
JavaParseNode subclass:#JavaMethodNode
instanceVariableNames:'modifiers declarator javadoc'
classVariableNames:''
poolDictionaries:''
category:'Languages-Java-Parser-AST'
!
!JavaMethodNode class methodsFor:'documentation'!
copyright
"
COPYRIGHT (c) 1996-2011 by Claus Gittinger
New code and modifications done at SWING Research Group [1]:
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
SWING Research Group, Czech Technical University in Prague
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
[1] Code written at SWING Research Group contains a signature
of one of the above copright owners. For exact set of such code,
see the differences between this version and version stx:libjava
as of 1.9.2010
"
! !
!JavaMethodNode methodsFor:'accessing'!
declarator
^ declarator
!
declarator:something
declarator := something.
!
javadoc
^ javadoc
!
javadoc:something
javadoc := something.
!
modifiers
^ modifiers
!
modifiers:something
modifiers := something.
!
selector
| name |
"/ self halt: 'does not work properly ;('.
name := self declarator identifier.
name := name, '('.
name := name, (self declarator parameterSelector).
name := name, ')', (self type selector).
^name.
"Created: / 13-12-2010 / 14:35:06 / Jan Kurs <kurs.jan@post.cz>"
"Modified: / 17-12-2010 / 17:47:10 / Jan Kurs <kurs.jan@post.cz>"
!
startPosition
startPosition ifNil: [ startPosition := self determineStartPosition. ].
^ startPosition
"Modified: / 13-12-2010 / 10:35:47 / Jan Kurs <kurs.jan@post.cz>"
!
type
^ type
!
type:something
type := something.
! !
!JavaMethodNode methodsFor:'printing & storing'!
printOn:aStream
aStream nextPutAll: self selector.
"Created: / 17-12-2010 / 17:38:20 / Jan Kurs <kurs.jan@post.cz>"
! !
!JavaMethodNode methodsFor:'private'!
determineStartPosition
self javadoc ifNotNil: [ ^ self javadoc lineNumber].
(self modifiers size > 0) ifTrue:[
^ self modifiers first lineNumber
].
^ self type lineNumber.
"Created: / 13-12-2010 / 10:34:01 / Jan Kurs <kurs.jan@post.cz>"
"Modified: / 17-12-2010 / 18:19:30 / Jan Kurs <kurs.jan@post.cz>"
! !
!JavaMethodNode methodsFor:'queries'!
isMethodDeclaration
^ true.
"Created: / 13-12-2010 / 14:34:14 / Jan Kurs <kurs.jan@post.cz>"
! !
!JavaMethodNode class methodsFor:'documentation'!
version_HG
^ '$Changeset: <not expanded> $'
!
version_SVN
^ '§Id§'
! !