code cleanup
authorcg
Thu, 12 Nov 1998 17:02:40 +0000
changeset 438 9142cf2fc8fa
parent 437 6e40fbebe1dc
child 439 9c3603a90f30
code cleanup
JavaClass.st
JavaObject.st
--- a/JavaClass.st	Thu Nov 12 15:34:25 1998 +0000
+++ b/JavaClass.st	Thu Nov 12 17:02:40 1998 +0000
@@ -1168,56 +1168,6 @@
     "Modified: / 6.11.1998 / 00:57:22 / cg"
 !
 
-invokeJavaMethod:aJavaMethod interpreter:i sender:aContext selector:sel with:arg1
-    "invoke a static java method, with 1 argument"
-
-    |val|
-
-    aJavaMethod numArgs ~~ 1 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifFalse:[
-	self halt:'non-static function'
-    ].
-
-    i push:arg1.
-    val := i interpret:aJavaMethod sender:aContext.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Created: 17.8.1997 / 18:03:58 / cg"
-    "Modified: 17.8.1997 / 18:08:27 / cg"
-!
-
-invokeStatic:selector
-    "send a static message, without args."
-
-    |method cls sel|
-
-    sel := selector asSymbolIfInterned.
-    sel notNil ifTrue:[
-        cls := self.
-        [cls notNil and:[cls ~~ JavaObject]] whileTrue:[
-            cls methodDictionary keysAndValuesDo:[:sel :aMethod |
-
-"/     aMethod name printNL.
-        
-                aMethod isStatic ifTrue:[
-                    sel == selector ifTrue:[
-                        ^ aMethod valueWithReceiver:self arguments:#()
-                    ]
-                ]
-            ].
-            cls := cls superclass.
-        ].
-    ].
-
-    ^ self doesNotUnderstand:(Message selector:selector)
-
-    "Created: / 5.8.1997 / 14:35:34 / cg"
-    "Modified: / 15.1.1998 / 00:31:27 / cg"
-!
-
 lookupMethodFor:selector
     |method cls sel|
 
@@ -1232,6 +1182,29 @@
     ].
 
     ^ nil
+!
+
+performStatic:selector
+    "send a static message, without args."
+
+    |javaMethod sel|
+
+    sel := selector asSymbolIfInterned.
+    sel notNil ifTrue:[
+        javaMethod := methodDictionary at:sel.
+        javaMethod notNil ifTrue:[
+            javaMethod isStatic ifTrue:[
+                ^ javaMethod 
+                    valueWithReceiver:self 
+                    arguments:#()
+            ]
+        ].
+    ].
+
+    ^ self doesNotUnderstand:(Message selector:selector)
+
+    "Modified: / 15.1.1998 / 00:31:27 / cg"
+    "Created: / 12.11.1998 / 16:29:20 / cg"
 ! !
 
 !JavaClass methodsFor:'printOut'!
@@ -1567,262 +1540,6 @@
     "Modified: / 10.2.1998 / 17:13:26 / cg"
 ! !
 
-!JavaClass methodsFor:'smalltalk interface'!
-
-invoke:selector
-    "send a message, without args."
-
-    |method cls sel|
-
-    sel := selector asSymbolIfInterned.
-    sel notNil ifTrue:[
-	cls := self.
-	[cls notNil and:[cls ~~ JavaObject]] whileTrue:[
-	    cls methodDictionary keysAndValuesDo:[:sel :aMethod |
-
-"/     aMethod name printNL.
-        
-		(aMethod name == selector 
-		or:[aMethod signatureNameWithoutReturnType = selector]) ifTrue:[
-		    aMethod numArgs == 0 ifTrue:[
-			^ aMethod
-			    valueWithReceiver:self
-			    arguments:#()
-"/                        ^ self 
-"/                            invokeJavaMethod:aMethod 
-"/                            sender:thisContext
-"/                            selector:selector
-		    ]
-		]
-	    ].
-	    cls := cls superclass.
-	].
-    ].
-
-    ^ self doesNotUnderstand:(Message selector:selector)
-
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') basicNew.
-     stack invoke:#'<init>'. 
-    "
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') basicNew.
-     stack invoke:#isEmpty. 
-    "
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') basicNew.
-     stack invoke:#size. 
-    "
-
-    "Created: / 30.7.1997 / 14:06:50 / cg"
-    "Modified: / 6.1.1998 / 18:21:34 / cg"
-!
-
-invoke:selector interpreter:i sender:aContext with:arg
-    "send a message, with 1 arg"
-
-    |method cls sel|
-
-    method := JavaClass lookupMethod:selector numArgs:1 in:self static:true.
-    method notNil ifTrue:[
-	^ self 
-	    invokeJavaMethod:method 
-	    interpreter:i 
-	    sender:aContext
-	    selector:selector
-	    with:arg
-    ].
-
-    ^ super doesNotUnderstand:(Message selector:selector)
-
-    "Created: 17.8.1997 / 18:10:32 / cg"
-    "Modified: 17.8.1997 / 18:33:52 / cg"
-!
-
-invoke:selector signature:signature with:arg
-    "send a message, with 1 arg1."
-
-    |method cls sel sig|
-
-    sel := selector asSymbolIfInterned.
-    sel notNil ifTrue:[
-	sig := signature asSymbolIfInterned.
-	sig notNil ifTrue:[
-	    cls := self.
-	    [cls notNil and:[cls ~~ JavaObject]] whileTrue:[
-		method := cls compiledMethodAt:sel signature:signature.
-		method notNil ifTrue:[
-		    ^ method
-			valueWithReceiver:self
-			arguments:(Array with:arg)
-"/                    ^ self 
-"/                        invokeJavaMethod:method 
-"/                        sender:thisContext
-"/                        selector:sel
-"/                        with:arg
-		].
-		cls := cls superclass.
-	    ].
-	].
-    ].
-
-    ^ self doesNotUnderstand:(Message selector:selector)
-
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') basicNew.
-     stack invoke:#'<init>'. 
-    "
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') basicNew.
-     stack invoke:#isEmpty. 
-    "
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') basicNew.
-     stack invoke:#size. 
-    "
-
-    "Created: / 30.7.1997 / 14:13:30 / cg"
-    "Modified: / 4.1.1998 / 16:32:45 / cg"
-!
-
-invoke:selector with:arg
-    "send a message, with one arg"
-
-    |method cls sel|
-
-    sel := selector asSymbolIfInterned.
-    sel notNil ifTrue:[
-        cls := self.
-        [cls notNil and:[cls ~~ JavaObject]] whileTrue:[
-            cls methodDictionary keysAndValuesDo:[:sel :aMethod |
-
-"/     aMethod name printNL.
-                (sel == selector
-                or:[aMethod name == selector 
-                or:[aMethod signatureNameWithoutReturnType = selector]]) ifTrue:[
-                    aMethod numArgs == 1 ifTrue:[
-                        ^ aMethod
-                            valueWithReceiver:self
-                            arguments:(Array with:arg)
-"/                        ^ self 
-"/                            invokeJavaMethod:aMethod 
-"/                            sender:thisContext 
-"/                            selector:selector    
-"/                            with:arg
-                    ]
-                ]
-            ].
-            cls := cls superclass.
-        ].
-    ].
-
-    ^ self doesNotUnderstand:(Message selector:selector)
-
-    "Modified: / 6.1.1998 / 21:04:04 / cg"
-!
-
-invoke:selector with:arg1 with:arg2
-    "send a message, with two args"
-
-    |method cls sel|
-
-    sel := selector asSymbolIfInterned.
-    sel notNil ifTrue:[
-	cls := self.
-	[cls notNil and:[cls ~~ JavaObject]] whileTrue:[
-	    cls methodDictionary keysAndValuesDo:[:sel :aMethod |
-
-"/     aMethod name printNL.
-		(aMethod name == selector 
-		or:[aMethod signatureNameWithoutReturnType = selector]) ifTrue:[
-		    aMethod numArgs == 2 ifTrue:[
-			^ self 
-			    invokeJavaMethod:aMethod 
-			    sender:thisContext 
-			    selector:selector    
-			    with:arg1
-			    with:arg2
-		    ]
-		]
-	    ].
-	    cls := cls superclass.
-	].
-    ].
-
-    ^ self doesNotUnderstand:(Message selector:selector)
-
-    "Modified: 30.7.1997 / 13:39:15 / cg"
-    "Created: 30.7.1997 / 14:00:09 / cg"
-!
-
-invoke:selector withAll:args
-    "send a message, with a number of args"
-
-    |method cls sel numArgGiven|
-
-    numArgGiven := args size.
-
-    sel := selector asSymbolIfInterned.
-    sel notNil ifTrue:[
-	cls := self.
-	[cls notNil and:[cls ~~ JavaObject]] whileTrue:[
-	    cls methodDictionary keysAndValuesDo:[:sel :aMethod |
-
-"/     aMethod name printNL.
-		(aMethod name == selector 
-		or:[aMethod signatureNameWithoutReturnType = selector]) ifTrue:[
-		    aMethod numArgs == numArgGiven ifTrue:[
-			^ self 
-			    invokeJavaMethod:aMethod 
-			    sender:thisContext 
-			    selector:selector    
-			    withAll:args
-		    ]
-		]
-	    ].
-	    cls := cls superclass.
-	].
-    ].
-
-    ^ self doesNotUnderstand:(Message selector:selector)
-
-    "Modified: 30.7.1997 / 13:39:15 / cg"
-    "Created: 30.7.1997 / 14:00:53 / cg"
-!
-
-methodMatching:aSmalltalkSelector
-    |numArgs cls|
-
-    numArgs := aSmalltalkSelector numArgs.
-    cls := self.
-    [cls notNil] whileTrue:[
-	methodDictionary keysAndValuesDo:[:jSelector :aMethod |
-	    aMethod numArgs == numArgs ifTrue:[
-		aMethod name = aSmalltalkSelector ifTrue:[
-		    ^ aMethod
-		]
-	    ]
-	].
-	cls := cls superclass
-    ].
-    ^ nil
-
-    "Modified: 1.2.1997 / 21:57:36 / cg"
-    "Created: 1.2.1997 / 21:57:53 / cg"
-! !
-
 !JavaClass methodsFor:'special'!
 
 arrayClass
@@ -1874,6 +1591,6 @@
 !JavaClass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.90 1998/11/12 14:53:28 cg Exp $'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.91 1998/11/12 17:02:04 cg Exp $'
 ! !
 JavaClass initialize!
--- a/JavaObject.st	Thu Nov 12 15:34:25 1998 +0000
+++ b/JavaObject.st	Thu Nov 12 17:02:40 1998 +0000
@@ -78,7 +78,7 @@
     "Modified: 8.8.1997 / 12:07:29 / cg"
 ! !
 
-!JavaObject methodsFor:'initialization'!
+!JavaObject ignoredMethodsFor:'initialization'!
 
 initializeFields:initialValues
     |sz|
@@ -98,94 +98,6 @@
     ]
 ! !
 
-!JavaObject methodsFor:'interpreter interface'!
-
-invoke:selector interpreter:i sender:aContext with:argument
-    "send a message, with 1 argument. 
-     TEMPORARY: This method needs more work."
-
-    |sel method cls argClass jSel|
-
-    sel := selector asSymbolIfInterned.
-    sel notNil ifTrue:[
-	"/
-	"/ hard to do - must find a matching method probably
-	"/
-	(argument isKindOf:JavaObject) ifTrue:[
-	    argClass := argument class.
-	] ifFalse:[
-	    "/
-	    "/ map to Java:
-	    "/   String -> [c
-	    "/
-	    (argument isMemberOf:String) ifTrue:[
-		jSel := (selector , '([C)V') asSymbolIfInterned.
-		jSel notNil ifTrue:[
-		    ^ self 
-			invoke:jSel 
-			interpreter:i 
-			sender:aContext 
-			with:argument
-		]
-	    ]
-	].
-
-	method := JavaClass lookupMethod:sel numArgs:1 in:self class static:false.
-	"/ method := self lookupMethod:sel numArgs:1.
-	method notNil ifTrue:[
-	    ^ method
-		valueWithReceiver:self
-		arguments:(Array with:argument)
-"/            ^ self 
-"/                invokeJavaMethod:method 
-"/                interpreter:i 
-"/                sender:aContext 
-"/                selector:sel
-"/                with:argument
-	].
-
-"/        cls := self class.
-"/        [cls notNil and:[cls ~~ JavaObject]] whileTrue:[
-"/            cls methodDictionary keysAndValuesDo:[:sel :aMethod |
-"/                aMethod name == sel ifTrue:[
-"/                    aMethod numArgs == 1 ifTrue:[
-"/                        "/
-"/                        "/ this is not completely correct:
-"/                        "/ must look for the best type-match,
-"/                        "/ (especially: have to look for best match
-"/                        "/  over whole superclass chain ...)
-"/                        "/ for now take the first with matching number of args
-"/                        "/
-"/                        ^ self invokeJavaMethod:aMethod with:argument
-"/                    ]
-"/                ]
-"/            ].
-"/            cls := cls superclass.
-"/        ].
-    ].
-
-    ^ super doesNotUnderstand:(Message selector:selector)
-
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') new.
-     stack invoke:#push with:1. 
-    "
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') new.
-     stack invoke:#push with:1. 
-     stack invoke:#push with:2. 
-     stack invoke:#pop. 
-     stack invoke:#pop. 
-     stack invoke:#pop. 
-    "
-
-    "Modified: / 5.1.1998 / 02:21:22 / cg"
-! !
-
 !JavaObject methodsFor:'message sending'!
 
 doesNotUnderstand:aMessage
@@ -217,305 +129,6 @@
     ^ super doesNotUnderstand:aMessage
 
     "Modified: / 10.11.1998 / 16:57:13 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s selector:sel
-    "invoke a java method, without arguments."
-
-    |val|
-
-    aJavaMethod numArgs ~~ 0 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:#() selector:sel.
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:29 / cg"
-    "Created: 30.7.1997 / 13:37:25 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s selector:sel with:arg1
-    "invoke a java method, with two arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    |val|
-
-    aJavaMethod numArgs ~~ 1 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:(Array with:arg1) selector:sel.
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-    i push:arg1.
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:35 / cg"
-    "Created: 30.7.1997 / 13:41:01 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s selector:sel with:arg1 with:arg2
-    "invoke a java method, with two arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    |val|
-
-    aJavaMethod numArgs ~~ 2 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:(Array with:arg1 with:arg2) selector:sel.
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-    i push:arg1.
-    i push:arg2.
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:35 / cg"
-    "Created: 30.7.1997 / 13:36:02 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s selector:sel with:arg1 with:arg2 with:arg3 with:arg4
-    "invoke a java method, with 4 arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    |val|
-
-    aJavaMethod numArgs ~~ 4 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:(Array with:arg1 with:arg2 with:arg3 with:arg4) selector:sel.
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-    i push:arg1.
-    i push:arg2.
-    i push:arg3.
-    i push:arg4.
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:35 / cg"
-    "Created: 6.8.1997 / 02:41:32 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s selector:sel with:arg1 with:arg2 with:arg3 with:arg4 with:arg5
-    "invoke a java method, with 5 arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    |val|
-
-    aJavaMethod numArgs ~~ 5 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:(Array with:arg1 with:arg2 with:arg3 with:arg4 with:arg5) selector:sel.
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-    i push:arg1.
-    i push:arg2.
-    i push:arg3.
-    i push:arg4.
-    i push:arg5.
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:35 / cg"
-    "Created: 3.8.1997 / 20:32:03 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s selector:sel with:arg1 with:arg2 with:arg3 with:arg4 with:arg5 with:arg6
-    "invoke a java method, with 6 arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    |val|
-
-    aJavaMethod numArgs ~~ 6 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:(Array with:arg1 with:arg2 with:arg3 with:arg4 with:arg5 with:arg6) selector:sel.
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-    i push:arg1.
-    i push:arg2.
-    i push:arg3.
-    i push:arg4.
-    i push:arg5.
-    i push:arg6.
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:35 / cg"
-    "Created: 7.8.1997 / 20:57:55 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s with:arg1 with:arg2
-    "invoke a java method, with two arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    |val|
-
-    aJavaMethod numArgs ~~ 2 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:(Array with:arg1 with:arg2).
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-    i push:arg1.
-    i push:arg2.
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:35 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s with:arg1 with:arg2 with:arg3
-    "invoke a java method, with 3 arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    |val|
-
-    aJavaMethod numArgs ~~ 3 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:(Array with:arg1 with:arg2 with:arg3).
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-    i push:arg1.
-    i push:arg2.
-    i push:arg3.
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:44 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s with:arg1 with:arg2 with:arg3 with:arg4
-    "invoke a java method, with 4 arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    |val|
-
-    aJavaMethod numArgs ~~ 4 ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:(Array with:arg1 with:arg2 with:arg3 with:arg4).
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-    i push:arg1.
-    i push:arg2.
-    i push:arg3.
-    i push:arg4.
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:51 / cg"
-!
-
-invokeJavaMethod:aJavaMethod interpreter:i sender:s withAll:args
-    "invoke a java method, with two arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    |val|
-
-    aJavaMethod numArgs ~~ args size ifTrue:[
-	self halt:'argument count'
-    ].
-    aJavaMethod isStatic ifTrue:[
-	self halt:'static function'
-    ].
-
-    val := aJavaMethod valueWithReceiver:self arguments:args.
-    val notNil ifTrue:[^ val].
-
-    i push:self.
-    args do:[:arg |
-	i push:arg.
-    ].
-
-    val := i interpret:aJavaMethod sender:s.
-
-    ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
-
-    "Modified: 30.7.1997 / 13:20:58 / cg"
-!
-
-invokeJavaMethod:aJavaMethod with:arg1 with:arg2
-    "invoke a java method, with two arguments.
-     CAVEAT: these cannot be long or doubles currently."
-
-    ^ self 
-	invokeJavaMethod:aJavaMethod 
-	interpreter:JavaInterpreter new 
-	sender:thisContext sender 
-	with:arg1 
-	with:arg2
-
-    "Modified: 30.7.1997 / 13:25:36 / cg"
 ! !
 
 !JavaObject methodsFor:'printing & storing'!
@@ -567,75 +180,6 @@
 
 !JavaObject methodsFor:'smalltalk interface'!
 
-invoke:selector
-    "send a message, without args"
-
-    |method|
-
-    method := JavaClass lookupMethod:selector numArgs:0 in:self class static:false.
-    method notNil ifTrue:[
-        ^ method
-            valueWithReceiver:self
-            arguments:#()
-            selector:(method selector)
-            search:nil
-            sender:nil
-    ].
-
-    ^ super doesNotUnderstand:(Message selector:selector)      
-
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') basicNew.
-     stack invoke:#'<init>'. 
-    "
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') new.
-     stack invoke:#isEmpty. 
-    "
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') new.
-     stack invoke:#size. 
-    "
-
-    "Modified: / 7.1.1998 / 14:04:03 / cg"
-!
-
-invoke:selector with:arg
-    "send a message, with 1 argument. 
-     TEMPORARY: This method needs more work."
-
-    ^ self 
-	invoke:selector 
-	interpreter:(JavaInterpreter new) 
-	sender:thisContext sender 
-	with:arg
-
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') new.
-     stack invoke:#push with:1. 
-    "
-    "
-     |stack|
-
-     stack := (Java at:'java/util/Stack') new.
-     stack invoke:#push with:1. 
-     stack invoke:#push with:2. 
-     stack invoke:#pop. 
-     stack invoke:#pop. 
-     stack invoke:#pop. 
-    "
-
-    "Modified: 17.8.1997 / 18:07:39 / cg"
-!
-
 lookupMethod:selector numArgs:nargs
     "lookup a method"
 
@@ -694,5 +238,5 @@
 !JavaObject class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaObject.st,v 1.43 1998/11/10 17:17:24 cg Exp $'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaObject.st,v 1.44 1998/11/12 17:02:40 cg Exp $'
 ! !