JavaMethodref.st
changeset 27 4560bb77bb36
parent 13 7075280c0cee
child 29 eb3367f8fb9b
--- a/JavaMethodref.st	Tue Apr 30 23:23:46 1996 +0000
+++ b/JavaMethodref.st	Tue Apr 30 23:24:49 1996 +0000
@@ -1,13 +1,43 @@
 JavaRef subclass:#JavaMethodref
-	instanceVariableNames:''
+	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.4 1996/04/17 20:57:59 cg Exp $'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaMethodref.st,v 1.5 1996/04/30 23:24:15 cg Exp $'
 ! !