*** empty log message ***
authorcg
Tue, 20 Oct 1998 13:06:50 +0000
changeset 395 ea3f9047f937
parent 394 1a853ab08431
child 396 a44fe30d2059
*** empty log message ***
JavaBuiltInClassPointerRef.st
--- a/JavaBuiltInClassPointerRef.st	Tue Oct 20 13:03:34 1998 +0000
+++ b/JavaBuiltInClassPointerRef.st	Tue Oct 20 13:06:50 1998 +0000
@@ -69,30 +69,38 @@
 !JavaBuiltInClassPointerRef methodsFor:'queries'!
 
 arrayClass
-    (nameandType startsWith:'[[') ifTrue:[
-        ^ Array
-    ].
-    (nameandType startsWith:'[I') ifTrue:[
-        ^ SignedIntegerArray
-    ].
-    (nameandType startsWith:'[B') ifTrue:[
-        ^ ByteArray
-    ].
-    (nameandType startsWith:'[C') ifTrue:[
-        ^ String "/ soon: TwoByteString
-    ].
-    (nameandType startsWith:'[D') ifTrue:[
-        ^ DoubleArray 
-    ].
-    (nameandType startsWith:'[F') ifTrue:[
-        ^ FloatArray 
+    |tc|
+
+    nameandType size >= 2 ifTrue:[
+        (nameandType at:1) == $[ ifTrue:[
+            tc := nameandType at:2.
+
+            ( tc == $[ ) ifTrue:[
+                ^ Array
+            ].
+            ( tc == $I ) ifTrue:[
+                ^ SignedIntegerArray
+            ].
+            ( tc == $B ) ifTrue:[
+                ^ ByteArray
+            ].
+            ( tc == $C ) ifTrue:[
+                ^ String "/ soon: TwoByteString
+            ].
+            ( tc == $D ) ifTrue:[
+                ^ DoubleArray 
+            ].
+            ( tc == $F ) ifTrue:[
+                ^ FloatArray 
+            ].
+        ].
     ].
 
 self halt.
     ^ self
 
     "Created: / 13.1.1998 / 00:02:39 / cg"
-    "Modified: / 20.10.1998 / 15:03:12 / cg"
+    "Modified: / 20.10.1998 / 15:05:13 / cg"
 !
 
 asClassPointerRef
@@ -127,5 +135,5 @@
 !JavaBuiltInClassPointerRef class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaBuiltInClassPointerRef.st,v 1.7 1998/10/20 13:03:34 cg Exp $'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaBuiltInClassPointerRef.st,v 1.8 1998/10/20 13:06:50 cg Exp $'
 ! !