3486 |
3486 |
3487 "Created: / 07-11-2006 / 11:43:31 / cg" |
3487 "Created: / 07-11-2006 / 11:43:31 / cg" |
3488 ! |
3488 ! |
3489 |
3489 |
3490 hasAllExtensionsLoaded |
3490 hasAllExtensionsLoaded |
|
3491 "answer true, if all extensions of this package have been loaded. |
|
3492 This is a query - so no side effects please" |
|
3493 |
3491 self extensionMethodNames pairWiseDo:[:className :selector | |
3494 self extensionMethodNames pairWiseDo:[:className :selector | |
3492 |cls| |
3495 |cls| |
3493 |
3496 |
3494 cls := Smalltalk classNamed:className. |
3497 cls := Smalltalk classNamed:className. |
3495 (cls isNil "or:[cls isLoaded not]") ifTrue:[ |
3498 (cls isNil "or:[cls isLoaded not]") ifTrue:[ |
3496 Transcript showCR:(self name,' missing extension class "',className,'".'). |
3499 Transcript showCR:(self name,' missing extension class "',className,'".'). |
3497 ^ false |
3500 ^ false |
3498 ]. |
3501 ]. |
3499 cls autoload. |
3502 "there is no possibility that we installed an extension method in an unloaded class" |
3500 (cls compiledMethodAt:selector) isNil ifTrue:[ |
3503 (cls isLoaded not or:[(cls compiledMethodAt:selector) isNil]) ifTrue:[ |
3501 Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".'). |
3504 Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".'). |
3502 ^ false |
3505 ^ false |
3503 ]. |
3506 ]. |
3504 ]. |
3507 ]. |
3505 ^ true. |
3508 ^ true. |