JavaMethodref.st
author cg
Tue, 30 Apr 1996 23:24:49 +0000
changeset 27 4560bb77bb36
parent 13 7075280c0cee
child 29 eb3367f8fb9b
permissions -rw-r--r--
checkin from browser

JavaRef subclass:#JavaMethodref
	instanceVariableNames:'method'
	classVariableNames:''
	poolDictionaries:''
	category:'Java-Reader-Support'
!


!JavaMethodref methodsFor:'resolving'!

method
    |nm sig mthd|

    method notNil ifTrue:[^ method].

    (class isMemberOf:JavaUnresolvedClassConstant) ifTrue:[
        class := class resolve
    ].
    (class isMemberOf:JavaUnresolvedClassConstant) ifTrue:[
        self halt.
    ].

    nm := nameandType name asSymbol.
    sig := nameandType signature.

    class selectorArray keysAndValuesDo:[:idx :sel |
"/ idx print. ' 'print. sel printNL.
        sel == nm ifTrue:[
            mthd := class methodArray at:idx.
            mthd signature = sig ifTrue:[
                method := mthd.
                ^ mthd
            ]
        ]
    ].
    self halt.
! !

!JavaMethodref class methodsFor:'documentation'!

version
    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaMethodref.st,v 1.5 1996/04/30 23:24:15 cg Exp $'
! !