JavaClass.st
changeset 415 b8abde6f5a0d
parent 413 51672b6b5010
child 418 9ab6eb91cfdc
equal deleted inserted replaced
414:0f33ff2c2fd3 415:b8abde6f5a0d
   164 ! !
   164 ! !
   165 
   165 
   166 !JavaClass class methodsFor:'method lookup'!
   166 !JavaClass class methodsFor:'method lookup'!
   167 
   167 
   168 convertArgsToJava:argArray
   168 convertArgsToJava:argArray
       
   169     "given a smalltalk argument array, convert to java objects as appropriate.
       
   170      Currently, only Strings and booleans are converted."
       
   171 
   169     |newArgs|
   172     |newArgs|
   170 
   173 
   171     newArgs := argArray copy.
   174     newArgs := argArray copy.
   172     newArgs keysAndValuesDo:[:idx :arg |
   175     newArgs keysAndValuesDo:[:idx :arg |
   173         arg isString ifTrue:[
   176         arg isString ifTrue:[
   174             newArgs at:idx put:(Java as_String:arg)
   177             newArgs at:idx put:(Java as_String:arg)
       
   178         ] ifFalse:[
       
   179             arg == true ifTrue:[
       
   180                 newArgs at:idx put:1
       
   181             ] ifFalse:[
       
   182                 arg == false ifTrue:[
       
   183                     newArgs at:idx put:0
       
   184                 ]
       
   185             ]
   175         ]
   186         ]
   176     ].
   187     ].
   177 
   188 
   178     ^ newArgs
   189     ^ newArgs
   179 
   190 
   180     "Created: / 9.4.1998 / 21:40:23 / cg"
   191     "Created: / 9.4.1998 / 21:40:23 / cg"
       
   192     "Modified: / 4.11.1998 / 17:14:36 / cg"
   181 !
   193 !
   182 
   194 
   183 lookupMethod:selector numArgs:nargs in:aClass static:staticMethod
   195 lookupMethod:selector numArgs:nargs in:aClass static:staticMethod
   184     "lookup a method"
   196     "lookup a method"
   185 
   197 
   201                 ((jSel == sel)
   213                 ((jSel == sel)
   202                 or:[aMethod name = sel 
   214                 or:[aMethod name = sel 
   203                 or:[aMethod signatureNameWithoutReturnType = sel]])
   215                 or:[aMethod signatureNameWithoutReturnType = sel]])
   204                 ifTrue:[
   216                 ifTrue:[
   205                     aMethod numArgs == nargs ifTrue:[
   217                     aMethod numArgs == nargs ifTrue:[
   206                         staticMethod ifTrue:[
   218                         staticMethod == (aMethod isStatic) ifTrue:[
   207                             aMethod isStatic ifTrue:[
   219                             ^ aMethod
   208                                 ^ aMethod
       
   209                             ]
       
   210                         ] ifFalse:[
       
   211                             aMethod isStatic ifFalse:[
       
   212                                 ^ aMethod
       
   213                             ]
       
   214                         ]
   220                         ]
   215                     ]
   221                     ]
   216                 ]
   222                 ]
   217             ].
   223             ].
   218 
   224 
   221     ].
   227     ].
   222 "/ self halt.
   228 "/ self halt.
   223     ^ nil
   229     ^ nil
   224 
   230 
   225     "Created: / 17.8.1997 / 18:25:47 / cg"
   231     "Created: / 17.8.1997 / 18:25:47 / cg"
   226     "Modified: / 14.10.1998 / 14:59:27 / cg"
   232     "Modified: / 4.11.1998 / 17:13:08 / cg"
       
   233 !
       
   234 
       
   235 lookupMethods:selector numArgs:nargs in:aClass static:staticMethod
       
   236     "lookup methods matching a selector.
       
   237      This is a special entry for doesNotUnderstand redirection
       
   238      (the caller must select the one method which fits the argument(s) best."
       
   239 
       
   240     |methods cls sel|
       
   241 
       
   242     sel := selector.
       
   243     (sel includes:$:) ifTrue:[
       
   244         sel := sel copyTo:(sel indexOf:$:)-1    
       
   245     ].
       
   246 
       
   247     sel := sel asSymbolIfInterned.
       
   248     sel notNil ifTrue:[
       
   249         cls := aClass.
       
   250 
       
   251         [cls notNil 
       
   252         and:[cls ~~ JavaObject
       
   253         and:[cls ~~ JavaClass]]] whileTrue:[
       
   254             cls methodDictionary keysAndValuesDo:[:jSel :aMethod |
       
   255                 ((jSel == sel)
       
   256                 or:[aMethod name = sel 
       
   257                 or:[aMethod signatureNameWithoutReturnType = sel]])
       
   258                 ifTrue:[
       
   259                     (nargs isNil
       
   260                     or:[aMethod numArgs == nargs]) ifTrue:[
       
   261                         staticMethod == (aMethod isStatic) ifTrue:[
       
   262                             methods isNil ifTrue:[
       
   263                                 methods := OrderedCollection new
       
   264                             ].
       
   265                             methods add:aMethod
       
   266                         ]
       
   267                     ]
       
   268                 ]
       
   269             ].
       
   270 
       
   271             cls := cls superclass.
       
   272         ].
       
   273     ].
       
   274     ^ methods ? #()
       
   275 
       
   276     "Created: / 4.11.1998 / 19:04:51 / cg"
       
   277     "Modified: / 4.11.1998 / 19:31:33 / cg"
   227 ! !
   278 ! !
   228 
   279 
   229 !JavaClass class methodsFor:'signature parsing'!
   280 !JavaClass class methodsFor:'signature parsing'!
   230 
   281 
   231 initialValueFromSignature:aSignature
   282 initialValueFromSignature:aSignature
   721 
   772 
   722 new
   773 new
   723     "create a new instance, preset its fields,
   774     "create a new instance, preset its fields,
   724      and call its JAVA init function"
   775      and call its JAVA init function"
   725 
   776 
   726     |newJavaObject sz "{ Class: SmallInteger }"|
   777     |newJavaObject|
       
   778 
       
   779     newJavaObject := self newCleared.
       
   780     newJavaObject perform:#'<init>()V'.
       
   781     ^ newJavaObject
       
   782 
       
   783     "
       
   784      (Java classNamed:'java.lang.String') basicNew inspect
       
   785      (Java classNamed:'java.lang.String') newCleared inspect
       
   786      (Java classNamed:'java.lang.String') new inspect
       
   787     "
       
   788 
       
   789     "Modified: / 4.11.1998 / 18:04:34 / cg"
       
   790 !
       
   791 
       
   792 newCleared
       
   793     "create a new cleared JAVA instance.
       
   794      Its instVars are cleared to the corresponding typed values;
       
   795      however, <init> is not invoked for it."
       
   796 
       
   797     |newJavaObject sz "{ Class: SmallInteger }" |
   727 
   798 
   728     "/ (self isInterface or:[self isAbstract]) ifTrue:[
   799     "/ (self isInterface or:[self isAbstract]) ifTrue:[
   729     (accessFlags bitAnd:(A_INTERFACE bitOr:A_ABSTRACT)) ~~ 0 ifTrue:[
   800     (accessFlags bitAnd:(A_INTERFACE bitOr:A_ABSTRACT)) ~~ 0 ifTrue:[
   730         JavaVM throwInstantiationExceptionFor:self.
   801         JavaVM throwInstantiationExceptionFor:self.
   731         ^ nil
   802         ^ nil
   738         1 to:sz do:[:i |
   809         1 to:sz do:[:i |
   739             newJavaObject instVarAt:i put:(initValues at:i)
   810             newJavaObject instVarAt:i put:(initValues at:i)
   740         ].
   811         ].
   741     ].
   812     ].
   742 
   813 
   743     newJavaObject perform:#'<init>()V'.
       
   744     ^ newJavaObject
       
   745 
       
   746     "
       
   747      (Java classNamed:'java.lang.String') basicNew inspect
       
   748      (Java classNamed:'java.lang.String') new inspect
       
   749     "
       
   750 
       
   751     "Modified: / 14.1.1998 / 23:16:19 / cg"
       
   752 !
       
   753 
       
   754 newCleared
       
   755     "create a new cleared JAVA instance.
       
   756      Its instVars are cleared to the corresponding typed values;
       
   757      however, <init> is not invoked for it."
       
   758 
       
   759     |newJavaObject sz "{ Class: SmallInteger }" |
       
   760 
       
   761     "/ (self isInterface or:[self isAbstract]) ifTrue:[
       
   762     (accessFlags bitAnd:(A_INTERFACE bitOr:A_ABSTRACT)) ~~ 0 ifTrue:[
       
   763         JavaVM throwInstantiationExceptionFor:self.
       
   764         ^ nil
       
   765     ].
       
   766 
       
   767     newJavaObject := super basicNew.
       
   768     initValues notNil ifTrue:[
       
   769         "/ newJavaObject initializeFields:initValues
       
   770         sz := self instSize.
       
   771         1 to:sz do:[:i |
       
   772             newJavaObject instVarAt:i put:(initValues at:i)
       
   773         ].
       
   774     ].
       
   775 
       
   776     ^ newJavaObject
   814     ^ newJavaObject
   777 
   815 
   778     "
   816     "
   779      (Java classNamed:'java.lang.String') basicNew inspect
   817      (Java classNamed:'java.lang.String') basicNew inspect
   780      (Java classNamed:'java.lang.String') newCleared inspect
   818      (Java classNamed:'java.lang.String') newCleared inspect
   781      (Java classNamed:'java.lang.String') new inspect
   819      (Java classNamed:'java.lang.String') new inspect
   782     "
   820     "
   783 
   821 
   784     "Modified: / 14.1.1998 / 23:16:26 / cg"
   822     "Modified: / 14.1.1998 / 23:16:26 / cg"
   785 !
       
   786 
       
   787 newFromInterpreter:anInterpreter sender:aJavaContext
       
   788     "create a new instance, and call its JAVA init function.
       
   789      This is done in the context of an already running interpreter."
       
   790 
       
   791     |newJavaObject|
       
   792 
       
   793     newJavaObject := self newCleared.
       
   794     newJavaObject invoke:#'<init>' interpreter:anInterpreter sender:aJavaContext.
       
   795     ^ newJavaObject
       
   796 
       
   797     "Created: 18.3.1997 / 17:33:07 / cg"
       
   798 ! !
   823 ! !
   799 
   824 
   800 !JavaClass methodsFor:'message sending'!
   825 !JavaClass methodsFor:'message sending'!
   801 
   826 
   802 invokeJavaMethod:aJavaMethod interpreter:i sender:aContext selector:sel
   827 doesNotUnderstand:aMessage
   803     "invoke a static java method, without argument"
   828     "as a courtesy to the smalltalker, try to map static methods as
       
   829      Smalltalk-class methods"
       
   830 
       
   831     |r args numArgs methods javaMethod sel eMsg argTypes|
       
   832 
       
   833 "/    r := thisContext sender receiver.
       
   834 "/
       
   835 "/    r isJavaClass ifTrue:[
       
   836 "/        self halt:'should not happen from within java code'.
       
   837 "/    ].
       
   838 "/    r class isJavaClass ifTrue:[
       
   839 "/        self halt:'should not happen from within java code'.
       
   840 "/    ].
       
   841 
       
   842     args := aMessage arguments.
       
   843     numArgs := args size.
       
   844     sel := aMessage selector.
       
   845 
       
   846     methods := JavaClass lookupMethods:sel numArgs:numArgs in:self static:true.
       
   847     methods size == 1 ifTrue:[
       
   848         javaMethod := methods first.
       
   849         "/ there is only one - try that one.
       
   850     ] ifFalse:[
       
   851         methods size > 1 ifTrue:[
       
   852             "/ more than one - select the best fit.
       
   853             "/ first, look for an exact match ...
       
   854             methods do:[:aMethod |
       
   855                 |argSig doesMatch|
       
   856 
       
   857                 doesMatch := true.
       
   858                 argSig := aMethod argSignature.
       
   859                 argSig keysAndValuesDo:[:i :argType |
       
   860                     |arg|
       
   861 
       
   862                     arg := args at:i.
       
   863                     argType == #int ifTrue:[
       
   864                         (arg isInteger 
       
   865                         and:[arg between:-16r8000000 and:16r7FFFFFFF]) ifFalse:[
       
   866                             doesMatch := false
       
   867                         ]
       
   868                     ] ifFalse:[
       
   869                         argType == #float ifTrue:[
       
   870                             arg isReal ifFalse:[
       
   871                                 doesMatch := false
       
   872                             ]
       
   873                         ] ifFalse:[
       
   874                             self halt
       
   875                         ]
       
   876                     ]
       
   877                 ].
       
   878                 doesMatch ifTrue:[
       
   879                     javaMethod notNil ifTrue:[
       
   880                         self halt:'more than one matching methods'
       
   881                     ].
       
   882                     javaMethod := aMethod
       
   883                 ]
       
   884             ].
       
   885         ]
       
   886     ].
       
   887 
       
   888     javaMethod notNil ifTrue:[
       
   889         args notNil ifTrue:[
       
   890             args := JavaClass convertArgsToJava:args.
       
   891         ].
       
   892         ^ javaMethod 
       
   893             valueWithReceiver:self 
       
   894             arguments:args
       
   895             selector:sel 
       
   896             search:nil
       
   897             sender:nil
       
   898     ].
       
   899 
       
   900     methods size > 1 ifTrue:[
       
   901         eMsg := 'no ''' , sel , '''-function for given argument type(s)'
       
   902     ] ifFalse:[
       
   903 
       
   904         methods := JavaClass lookupMethods:sel numArgs:nil in:self static:true.
       
   905         methods size > 0 ifTrue:[
       
   906             methods size == 1 ifTrue:[
       
   907                 javaMethod := methods first.
       
   908 
       
   909                 javaMethod numArgs == 1 ifTrue:[
       
   910                     argTypes := javaMethod argSignature first printString.
       
   911                     eMsg := '''' , sel , '''-function expects ' , argTypes , ' as argument'.
       
   912                 ] ifFalse:[
       
   913                     eMsg := '''' , sel , '''-function expects ' , javaMethod numArgs printString , ' argument(s)'
       
   914                 ].
       
   915             ] ifFalse:[
       
   916                 numArgs == 0 ifTrue:[
       
   917                     eMsg := 'no ''' , sel , '''-function without arguments'
       
   918                 ] ifFalse:[
       
   919                     eMsg := 'no ''' , sel , '''-function for given number of arguments'
       
   920                 ].
       
   921             ].
       
   922         ].
       
   923     ].
       
   924 
       
   925     eMsg notNil ifTrue:[
       
   926         ^ MessageNotUnderstoodSignal
       
   927                     raiseRequestWith:aMessage
       
   928                          errorString:eMsg
       
   929                                   in:thisContext sender
       
   930     ].
       
   931     ^ super doesNotUnderstand:aMessage
       
   932 
       
   933     "Modified: / 4.11.1998 / 19:40:48 / cg"
       
   934 !
       
   935 
       
   936 invokeJavaMethod:aJavaMethod interpreter:i sender:aContext selector:sel with:arg1
       
   937     "invoke a static java method, with 1 argument"
   804 
   938 
   805     |val|
   939     |val|
   806 
   940 
   807     aJavaMethod numArgs ~~ 0 ifTrue:[
   941     aJavaMethod numArgs ~~ 1 ifTrue:[
   808 	self halt:'argument count'
   942 	self halt:'argument count'
   809     ].
   943     ].
   810     aJavaMethod isStatic ifFalse:[
   944     aJavaMethod isStatic ifFalse:[
   811 	self halt:'non-static function'
   945 	self halt:'non-static function'
   812     ].
   946     ].
   813 
   947 
   814     val := i interpret:aJavaMethod sender:aContext.
       
   815 
       
   816     ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
       
   817 
       
   818     "Created: 17.8.1997 / 18:05:14 / cg"
       
   819     "Modified: 17.8.1997 / 18:08:22 / cg"
       
   820 !
       
   821 
       
   822 invokeJavaMethod:aJavaMethod interpreter:i sender:aContext selector:sel with:arg1
       
   823     "invoke a static java method, with 1 argument"
       
   824 
       
   825     |val|
       
   826 
       
   827     aJavaMethod numArgs ~~ 1 ifTrue:[
       
   828 	self halt:'argument count'
       
   829     ].
       
   830     aJavaMethod isStatic ifFalse:[
       
   831 	self halt:'non-static function'
       
   832     ].
       
   833 
       
   834     i push:arg1.
   948     i push:arg1.
   835     val := i interpret:aJavaMethod sender:aContext.
   949     val := i interpret:aJavaMethod sender:aContext.
   836 
   950 
   837     ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
   951     ^ JavaObject convertJavaObject:val signature:(aJavaMethod retValSignature)
   838 
   952 
   839     "Created: 17.8.1997 / 18:03:58 / cg"
   953     "Created: 17.8.1997 / 18:03:58 / cg"
   840     "Modified: 17.8.1997 / 18:08:27 / cg"
   954     "Modified: 17.8.1997 / 18:08:27 / cg"
   841 !
       
   842 
       
   843 invokeJavaMethod:aJavaMethod sender:aContext selector:sel
       
   844     "invoke a static java method, without arguments"
       
   845 
       
   846     ^ self
       
   847 	invokeJavaMethod:aJavaMethod
       
   848 	interpreter:(JavaInterpreter new)
       
   849 	sender:aContext 
       
   850 	selector:sel
       
   851 
       
   852     "Modified: 17.8.1997 / 18:05:35 / cg"
       
   853 !
       
   854 
       
   855 invokeJavaMethod:aJavaMethod sender:aContext selector:sel with:arg1
       
   856     "invoke a static java method, with 1 argument"
       
   857 
       
   858     ^ self
       
   859 	invokeJavaMethod:aJavaMethod
       
   860 	interpreter:(JavaInterpreter new)
       
   861 	sender:aContext 
       
   862 	selector:sel 
       
   863 	with:arg1
       
   864 
       
   865     "Modified: 17.8.1997 / 18:04:44 / cg"
       
   866 !
   955 !
   867 
   956 
   868 invokeStatic:selector
   957 invokeStatic:selector
   869     "send a static message, without args."
   958     "send a static message, without args."
   870 
   959 
  1278 
  1367 
  1279     "Created: / 30.7.1997 / 14:06:50 / cg"
  1368     "Created: / 30.7.1997 / 14:06:50 / cg"
  1280     "Modified: / 6.1.1998 / 18:21:34 / cg"
  1369     "Modified: / 6.1.1998 / 18:21:34 / cg"
  1281 !
  1370 !
  1282 
  1371 
  1283 invoke:selector interpreter:i sender:aContext
       
  1284     "send a message, without args"
       
  1285 
       
  1286     |method cls sel|
       
  1287 
       
  1288     method := JavaClass lookupMethod:selector numArgs:0 in:self static:true.
       
  1289     method notNil ifTrue:[
       
  1290 	^ self 
       
  1291 	    invokeJavaMethod:method 
       
  1292 	    interpreter:i 
       
  1293 	    sender:aContext
       
  1294 	    selector:selector
       
  1295     ].
       
  1296 
       
  1297     ^ super doesNotUnderstand:(Message selector:selector)
       
  1298 
       
  1299     "Created: 17.8.1997 / 18:10:08 / cg"
       
  1300     "Modified: 17.8.1997 / 18:33:59 / cg"
       
  1301 !
       
  1302 
       
  1303 invoke:selector interpreter:i sender:aContext with:arg
  1372 invoke:selector interpreter:i sender:aContext with:arg
  1304     "send a message, with 1 arg"
  1373     "send a message, with 1 arg"
  1305 
  1374 
  1306     |method cls sel|
  1375     |method cls sel|
  1307 
  1376 
  1317 
  1386 
  1318     ^ super doesNotUnderstand:(Message selector:selector)
  1387     ^ super doesNotUnderstand:(Message selector:selector)
  1319 
  1388 
  1320     "Created: 17.8.1997 / 18:10:32 / cg"
  1389     "Created: 17.8.1997 / 18:10:32 / cg"
  1321     "Modified: 17.8.1997 / 18:33:52 / cg"
  1390     "Modified: 17.8.1997 / 18:33:52 / cg"
  1322 !
       
  1323 
       
  1324 invoke:selector signature:signature
       
  1325     "send a message, without args."
       
  1326 
       
  1327     |method cls sel sig|
       
  1328 
       
  1329     sel := selector asSymbolIfInterned.
       
  1330     sel notNil ifTrue:[
       
  1331 	sig := signature asSymbolIfInterned.
       
  1332 	sig notNil ifTrue:[
       
  1333 	    cls := self.
       
  1334 	    [cls notNil and:[cls ~~ JavaObject]] whileTrue:[
       
  1335 		method := cls compiledMethodAt:sel signature:signature.
       
  1336 		method notNil ifTrue:[
       
  1337 		    ^ self 
       
  1338 			invokeJavaMethod:method 
       
  1339 			sender:thisContext
       
  1340 			selector:sel
       
  1341 		].
       
  1342 		cls := cls superclass.
       
  1343 	    ].
       
  1344 	].
       
  1345     ].
       
  1346 
       
  1347     ^ self doesNotUnderstand:(Message selector:selector)
       
  1348 
       
  1349     "
       
  1350      |stack|
       
  1351 
       
  1352      stack := (Java at:'java/util/Stack') basicNew.
       
  1353      stack invoke:#'<init>'. 
       
  1354     "
       
  1355     "
       
  1356      |stack|
       
  1357 
       
  1358      stack := (Java at:'java/util/Stack') basicNew.
       
  1359      stack invoke:#isEmpty. 
       
  1360     "
       
  1361     "
       
  1362      |stack|
       
  1363 
       
  1364      stack := (Java at:'java/util/Stack') basicNew.
       
  1365      stack invoke:#size. 
       
  1366     "
       
  1367 
       
  1368     "Created: 30.7.1997 / 14:12:29 / cg"
       
  1369     "Modified: 1.8.1997 / 00:04:45 / cg"
       
  1370 !
  1391 !
  1371 
  1392 
  1372 invoke:selector signature:signature with:arg
  1393 invoke:selector signature:signature with:arg
  1373     "send a message, with 1 arg1."
  1394     "send a message, with 1 arg1."
  1374 
  1395 
  1524 
  1545 
  1525     "Modified: 30.7.1997 / 13:39:15 / cg"
  1546     "Modified: 30.7.1997 / 13:39:15 / cg"
  1526     "Created: 30.7.1997 / 14:00:53 / cg"
  1547     "Created: 30.7.1997 / 14:00:53 / cg"
  1527 !
  1548 !
  1528 
  1549 
  1529 invokeSignature:signature
       
  1530     "send a message, without args."
       
  1531 
       
  1532     |method cls sel|
       
  1533 
       
  1534     sel := signature asSymbolIfInterned.
       
  1535     sel notNil ifTrue:[
       
  1536 	cls := self.
       
  1537 	[cls notNil and:[cls ~~ JavaObject]] whileTrue:[
       
  1538 	    cls methodDictionary keysAndValuesDo:[:sel :aMethod |
       
  1539 
       
  1540 "/     aMethod name printNL.
       
  1541         
       
  1542 		aMethod signatureName = signature ifTrue:[
       
  1543 		    aMethod numArgs == 0 ifTrue:[
       
  1544 			^ self 
       
  1545 			    invokeJavaMethod:aMethod 
       
  1546 			    sender:thisContext
       
  1547 			    selector:signature
       
  1548 		    ]
       
  1549 		]
       
  1550 	    ].
       
  1551 	    cls := cls superclass.
       
  1552 	].
       
  1553     ].
       
  1554 
       
  1555     ^ self doesNotUnderstand:(Message selector:signature)
       
  1556 
       
  1557     "
       
  1558      |stack|
       
  1559 
       
  1560      stack := (Java at:'java/util/Stack') basicNew.
       
  1561      stack invoke:#'<init>'. 
       
  1562     "
       
  1563     "
       
  1564      |stack|
       
  1565 
       
  1566      stack := (Java at:'java/util/Stack') basicNew.
       
  1567      stack invoke:#isEmpty. 
       
  1568     "
       
  1569     "
       
  1570      |stack|
       
  1571 
       
  1572      stack := (Java at:'java/util/Stack') basicNew.
       
  1573      stack invoke:#size. 
       
  1574     "
       
  1575 
       
  1576     "Modified: 30.7.1997 / 14:07:55 / cg"
       
  1577     "Created: 30.7.1997 / 14:09:31 / cg"
       
  1578 !
       
  1579 
       
  1580 methodMatching:aSmalltalkSelector
  1550 methodMatching:aSmalltalkSelector
  1581     |numArgs cls|
  1551     |numArgs cls|
  1582 
  1552 
  1583     numArgs := aSmalltalkSelector numArgs.
  1553     numArgs := aSmalltalkSelector numArgs.
  1584     cls := self.
  1554     cls := self.
  1625 ! !
  1595 ! !
  1626 
  1596 
  1627 !JavaClass class methodsFor:'documentation'!
  1597 !JavaClass class methodsFor:'documentation'!
  1628 
  1598 
  1629 version
  1599 version
  1630     ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.82 1998/11/03 22:05:13 cg Exp $'
  1600     ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.83 1998/11/04 18:57:36 cg Exp $'
  1631 ! !
  1601 ! !
  1632 JavaClass initialize!
  1602 JavaClass initialize!