--- a/JavaMethod.st Fri Aug 11 09:12:44 2000 +0000
+++ b/JavaMethod.st Tue Aug 15 14:32:11 2000 +0000
@@ -11,6 +11,8 @@
"
+"{ Package: 'stx:libjava' }"
+
CompiledCode variableSubclass:#JavaMethod
instanceVariableNames:'accessFlags selector javaClass signature lineNumberTable
localVariableTable'
@@ -573,6 +575,31 @@
"Modified: / 8.1.1998 / 21:06:32 / cg"
!
+specTextFromSignature:aSignature in:aPackage withName:name
+ "given a signature, return a spec as boldified text"
+
+ |s argSpec retvalSpec|
+
+ s := aSignature readStream.
+ s next ~~ $( ifTrue:[self halt. ^ name].
+
+ argSpec := self argSpecFromStream:s in:aPackage.
+
+ s next ~~ $) ifTrue:[self halt. ^ name].
+
+ retvalSpec := self retvalSpecFromStream:s in:aPackage.
+
+"/ ^ retvalSpec , ' ' , (name asText allBold) , ' (' , argSpec , ')'
+ ^ (name asText allBold) , ' (' , argSpec , ')'
+
+ "
+ JavaMethod specTextFromSignature:'(LObject;)V' withName:'foo'
+ JavaMethod specTextFromSignature:'(BB)S' withName:'foo'
+ "
+
+ "Modified: / 8.1.1998 / 19:11:20 / cg"
+!
+
specTextFromSignature:aSignature withName:name
"given a signature, return a spec as boldified text"
@@ -692,6 +719,12 @@
^ self class argSigArrayFromSignature:signature
!
+comment
+ "should access the source here, and parse any method comment"
+
+ ^ nil
+!
+
constantPool
^ javaClass constantPool
@@ -1389,11 +1422,9 @@
"/ ].
self name = #'<init>' ifTrue:[
- ^ self class specTextFromSignature:signature withName:(javaClass lastName).
+ ^ self class specTextFromSignature:signature in:javaClass package withName:(javaClass lastName).
].
- ^ self signatureNameText
-
- "Modified: / 5.11.1998 / 19:44:55 / cg"
+ ^ self class specTextFromSignature:signature in:javaClass package withName:(self name)
!
shortDisplayString
@@ -1826,6 +1857,6 @@
!JavaMethod class methodsFor:'documentation'!
version
- ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaMethod.st,v 1.95 2000/03/21 11:24:58 cg Exp $'
+ ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaMethod.st,v 1.96 2000/08/15 14:32:11 cg Exp $'
! !
JavaMethod initialize!