JavaClass.st
changeset 375 988259a6fa03
parent 360 e3df9401df00
child 393 1efe41b5bc98
equal deleted inserted replaced
374:946599670402 375:988259a6fa03
   185 
   185 
   186     |method cls sel|
   186     |method cls sel|
   187 
   187 
   188     sel := selector.
   188     sel := selector.
   189     (sel includes:$:) ifTrue:[
   189     (sel includes:$:) ifTrue:[
   190 	sel := sel copyTo:(sel indexOf:$:)-1    
   190         sel := sel copyTo:(sel indexOf:$:)-1    
   191     ].
   191     ].
   192 
   192 
   193     sel := sel asSymbolIfInterned.
   193     sel := sel asSymbolIfInterned.
   194     sel notNil ifTrue:[
   194     sel notNil ifTrue:[
   195 	cls := aClass.
   195         cls := aClass.
   196 
   196 
   197 	[cls notNil 
   197         [cls notNil 
   198 	and:[cls ~~ JavaObject
   198         and:[cls ~~ JavaObject
   199 	and:[cls ~~ JavaClass]]] whileTrue:[
   199         and:[cls ~~ JavaClass]]] whileTrue:[
   200 	    cls methodDictionary keysAndValuesDo:[:jSel :aMethod |
   200             cls methodDictionary keysAndValuesDo:[:jSel :aMethod |
   201 		((jSel == sel)
   201                 ((jSel == sel)
   202 		or:[aMethod name = sel 
   202                 or:[aMethod name = sel 
   203 		or:[aMethod signatureNameWithoutReturnType = sel]])
   203                 or:[aMethod signatureNameWithoutReturnType = sel]])
   204 		ifTrue:[
   204                 ifTrue:[
   205 		    aMethod numArgs == nargs ifTrue:[
   205                     aMethod numArgs == nargs ifTrue:[
   206 			staticMethod ifTrue:[
   206                         staticMethod ifTrue:[
   207 			    aMethod isStatic ifTrue:[
   207                             aMethod isStatic ifTrue:[
   208 				^ aMethod
   208                                 ^ aMethod
   209 			    ]
   209                             ]
   210 			] ifFalse:[
   210                         ] ifFalse:[
   211 			    aMethod isStatic ifFalse:[
   211                             aMethod isStatic ifFalse:[
   212 				^ aMethod
   212                                 ^ aMethod
   213 			    ]
   213                             ]
   214 			]
   214                         ]
   215 		    ]
   215                     ]
   216 		]
   216                 ]
   217 	    ].
   217             ].
   218 
   218 
   219 	    cls := cls superclass.
   219             cls := cls superclass.
   220 	].
   220         ].
   221     ].
   221     ].
   222 self halt.
   222 "/ self halt.
   223     ^ nil
   223     ^ nil
   224 
   224 
   225     "Created: 17.8.1997 / 18:25:47 / cg"
   225     "Created: / 17.8.1997 / 18:25:47 / cg"
   226     "Modified: 17.8.1997 / 18:31:57 / cg"
   226     "Modified: / 14.10.1998 / 14:59:27 / cg"
   227 ! !
   227 ! !
   228 
   228 
   229 !JavaClass class methodsFor:'signature parsing'!
   229 !JavaClass class methodsFor:'signature parsing'!
   230 
   230 
   231 initialValueFromSignature:aSignature
   231 initialValueFromSignature:aSignature
   994 
   994 
   995 browserClass
   995 browserClass
   996     "return the browser to use for this class - 
   996     "return the browser to use for this class - 
   997      this can be redefined in special classes, to get different browsers"
   997      this can be redefined in special classes, to get different browsers"
   998 
   998 
   999     ^ JavaBrowser
   999     ^ SystemBrowser "/ JavaBrowser
       
  1000 
       
  1001     "Modified: / 14.10.1998 / 15:28:38 / cg"
  1000 !
  1002 !
  1001 
  1003 
  1002 hasInterface:aJavaInterface
  1004 hasInterface:aJavaInterface
  1003     "return true, if I respond to all methods as
  1005     "return true, if I respond to all methods as
  1004      required by the argument, an aJavaInterface"
  1006      required by the argument, an aJavaInterface"
  1507 ! !
  1509 ! !
  1508 
  1510 
  1509 !JavaClass class methodsFor:'documentation'!
  1511 !JavaClass class methodsFor:'documentation'!
  1510 
  1512 
  1511 version
  1513 version
  1512     ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.78 1998/07/20 11:27:08 cg Exp $'
  1514     ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.79 1998/10/14 16:26:43 cg Exp $'
  1513 ! !
  1515 ! !
  1514 JavaClass initialize!
  1516 JavaClass initialize!