src/JavaMethodRef2.st
author vranyj1
Wed, 22 Aug 2012 13:54:16 +0000
branchjk_new_structure
changeset 1655 340244702a94
parent 1353 2968f8acb434
child 1728 0d275432230d
permissions -rw-r--r--
- JavaMethodRef2 class definition changed: #findResolvedValue:

"
 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' }"

JavaClassContentRef2 subclass:#JavaMethodRef2
	instanceVariableNames:'selectorCache'
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Java-Reader-Support-new'
!

!JavaMethodRef2 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

"
! !

!JavaMethodRef2 methodsFor:'printing & storing'!

printOn:aStream
    "append a printed representation if the receiver to the argument, aStream"

    super printOn:aStream.
! !

!JavaMethodRef2 methodsFor:'private - resolving'!

findResolvedStaticValue
    <resource: #obsolete>
"/    Logger 
"/        log: self printString 
"/                , ': findResolvedStaticValue is obsolete, call resolve its safe :)'
"/        severity: #info
"/        facility: #JVM.
    self findResolvedValue.

    "Created: / 28-04-2011 / 22:45:53 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    "Modified: / 07-12-2011 / 15:10:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    "Modified: / 07-12-2011 / 21:07:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

findResolvedValue: doClassInit
    "Resolve reference and set valueCache."
    
    valueCache := JavaResolver uniqueInstance 
                resolveMethodIndentifiedByRef: self.
    classCache := (constantPool at: classRefIndex) resolve: doClassInit.
    classCache isNil ifTrue: [ self breakPoint: #mh ].
    nameAndTypeCache := (constantPool at: nameAndTypeIndex) resolve.
    nameAndTypeCache isNil ifTrue: [ self breakPoint: #mh ].
    selectorCache isNil ifTrue: [
        selectorCache := (nameAndTypeCache name , nameAndTypeCache descriptor) asSymbol
    ].

    "Modified: / 18-05-2011 / 12:44:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
    "Created: / 09-02-2012 / 23:10:32 / mh <hlopik@gmail.com>"
    "Modified: / 22-08-2012 / 14:53:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaMethodRef2 methodsFor:'queries'!

isJavaMethodRef
^ true.

    "Created: / 11-04-2011 / 19:56:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
! !

!JavaMethodRef2 class methodsFor:'documentation'!

version_SVN
    ^ '$Id$'
! !