*** empty log message ***
authorcg
Tue, 05 Aug 1997 15:03:28 +0000
changeset 197 97fa933db02f
parent 196 4a22bc62f537
child 198 5543d1079a4a
*** empty log message ***
JavaClass.st
JavaObject.st
JavaProcess.st
--- a/JavaClass.st	Fri Aug 01 20:53:49 1997 +0000
+++ b/JavaClass.st	Tue Aug 05 15:03:28 1997 +0000
@@ -93,7 +93,9 @@
             ]
         ]
     ].
-    ns at:parts last asSymbol put:cls.
+    ns isNamespace ifTrue:[
+        ns at:parts last asSymbol put:cls.
+    ].
 
     "/ for ST/X browsing
     Smalltalk at:('JAVA::' , aString) asSymbol put:cls.
@@ -101,7 +103,7 @@
     ^ cls
 
     "Created: 15.4.1996 / 15:52:55 / cg"
-    "Modified: 31.7.1997 / 22:14:16 / cg"
+    "Modified: 3.8.1997 / 17:01:15 / cg"
 !
 
 name:aString
@@ -302,9 +304,12 @@
      this can be redefined in special classes, to get classes with
      Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
 
+    ^ Compiler.
+
     ^ JavaCompiler
 
     "Created: 31.7.1997 / 23:03:37 / cg"
+    "Modified: 4.8.1997 / 16:50:08 / cg"
 !
 
 evaluatorClass
@@ -312,9 +317,12 @@
      this can be redefined in special classes, to get classes with
      Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
 
+    ^ Compiler.
+
     ^ JavaCompiler
 
     "Created: 31.7.1997 / 23:03:56 / cg"
+    "Modified: 4.8.1997 / 16:49:14 / cg"
 !
 
 parserClass
@@ -322,9 +330,12 @@
      this can be redefined in special classes, to get classes with
      Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
 
+    ^ Compiler.
+
     ^ JavaCompiler
 
     "Created: 31.7.1997 / 23:04:11 / cg"
+    "Modified: 4.8.1997 / 16:50:18 / cg"
 ! !
 
 !JavaClass methodsFor:'documentation support'!
@@ -1233,6 +1244,6 @@
 !JavaClass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.55 1997/08/01 20:48:35 cg Exp $'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.56 1997/08/05 15:03:22 cg Exp $'
 ! !
 JavaClass initialize!
--- a/JavaObject.st	Fri Aug 01 20:53:49 1997 +0000
+++ b/JavaObject.st	Tue Aug 05 15:03:28 1997 +0000
@@ -230,7 +230,7 @@
      stack invoke:#pop. 
     "
 
-    "Modified: 30.7.1997 / 13:46:39 / cg"
+    "Modified: 5.8.1997 / 02:52:42 / cg"
 !
 
 invoke:selector interpreter:i sender:aContext with:arg1 with:arg2 
@@ -305,6 +305,30 @@
     "Modified: 30.7.1997 / 13:47:45 / cg"
 !
 
+invoke:selector interpreter:i sender:aContext with:arg1 with:arg2 with:arg3 with:arg4 with:arg5
+    "send a message, with 5 arguments. 
+     TEMPORARY: This method needs more work."
+
+    |sel method cls argClass jSel|
+
+    sel := selector asSymbolIfInterned.
+    sel notNil ifTrue:[
+        method := self lookupMethod:sel numArgs:5.
+        method notNil ifTrue:[
+            ^ self 
+                invokeJavaMethod:method 
+                interpreter:i 
+                sender:aContext 
+                selector:selector
+                with:arg1 with:arg2 with:arg3 with:arg4 with:arg5
+        ].
+    ].
+
+    ^ super doesNotUnderstand:(Message selector:selector)
+
+    "Modified: 3.8.1997 / 20:31:03 / cg"
+!
+
 invoke:selector interpreter:i sender:aContext withAll:arguments
     "send a message, with arguments. 
      TEMPORARY: This method needs more work."
@@ -434,6 +458,37 @@
     "Created: 30.7.1997 / 13:36:02 / 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 with:arg1 with:arg2
     "invoke a java method, with two arguments.
      CAVEAT: these cannot be long or doubles currently."
@@ -703,6 +758,24 @@
     "Created: 30.7.1997 / 13:48:24 / cg"
 !
 
+invoke:selector with:arg1 with:arg2 with:arg3 with:arg4 with:arg5
+    "send a message, with 5 argument. 
+     TEMPORARY: This method needs more work."
+
+    ^ self 
+        invoke:selector 
+        interpreter:JavaInterpreter new 
+        sender:thisContext sender 
+        with:arg1
+        with:arg2
+        with:arg3
+        with:arg4
+        with:arg5
+
+    "Modified: 30.7.1997 / 13:44:58 / cg"
+    "Created: 3.8.1997 / 20:30:22 / cg"
+!
+
 invoke:selector withAll:args
     "send a message, with anumber of arguments. 
      TEMPORARY: This method needs more work."
@@ -775,5 +848,5 @@
 !JavaObject class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaObject.st,v 1.29 1997/08/01 19:53:21 cg Exp $'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaObject.st,v 1.30 1997/08/05 15:03:28 cg Exp $'
 ! !
--- a/JavaProcess.st	Fri Aug 01 20:53:49 1997 +0000
+++ b/JavaProcess.st	Tue Aug 05 15:03:28 1997 +0000
@@ -9,10 +9,13 @@
 !JavaProcess methodsFor:'accessing'!
 
 suspendedContext
+^ super suspendedContext.
+
     suspendedContext isNil ifTrue:[^ super suspendedContext].
     ^ suspendedContext
 
     "Created: 7.5.1996 / 09:02:03 / cg"
+    "Modified: 4.8.1997 / 01:52:13 / cg"
 !
 
 suspendedContext:aContext
@@ -24,5 +27,5 @@
 !JavaProcess class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaProcess.st,v 1.5 1997/02/01 21:07:57 cg Exp $'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaProcess.st,v 1.6 1997/08/05 15:03:16 cg Exp $'
 ! !