equal
deleted
inserted
replaced
2336 !Class methodsFor:'fileOut'! |
2336 !Class methodsFor:'fileOut'! |
2337 |
2337 |
2338 basicFileOutDefinitionOn:aStream withNameSpace:forceNameSpace |
2338 basicFileOutDefinitionOn:aStream withNameSpace:forceNameSpace |
2339 "append an expression on aStream, which defines myself." |
2339 "append an expression on aStream, which defines myself." |
2340 |
2340 |
2341 |s owner ns nsName fullName| |
2341 |s owner ns nsName fullName superName cls| |
2342 |
2342 |
2343 owner := self owningClass. |
2343 owner := self owningClass. |
2344 |
2344 |
2345 owner isNil ifTrue:[ |
2345 owner isNil ifTrue:[ |
2346 ns := self nameSpace. |
2346 ns := self nameSpace. |
2369 ] ifFalse:[ |
2369 ] ifFalse:[ |
2370 (ns == superclass nameSpace |
2370 (ns == superclass nameSpace |
2371 and:[superclass owningClass isNil]) ifTrue:[ |
2371 and:[superclass owningClass isNil]) ifTrue:[ |
2372 s := superclass nameWithoutPrefix |
2372 s := superclass nameWithoutPrefix |
2373 ] ifFalse:[ |
2373 ] ifFalse:[ |
2374 s := superclass nameWithoutNameSpacePrefix |
2374 "/ a very special (rare) situation: |
|
2375 "/ my superclass resides in another nameSpace, |
|
2376 "/ but there is something else named like this |
|
2377 "/ to be found in my nameSpace (or a private class) |
|
2378 |
|
2379 superName := superclass nameWithoutNameSpacePrefix asSymbol. |
|
2380 cls := self privateClassesAt:superName. |
|
2381 cls isNil ifTrue:[ |
|
2382 cls := self nameSpace at:superName. |
|
2383 ]. |
|
2384 (cls notNil and:[cls ~~ superclass]) ifTrue:[ |
|
2385 s := superclass nameSpace name , '::' , superName |
|
2386 ] ifFalse:[ |
|
2387 s := superName |
|
2388 ] |
2375 ] |
2389 ] |
2376 ] |
2390 ] |
2377 ]. |
2391 ]. |
2378 |
2392 |
2379 aStream nextPutAll:s. |
2393 aStream nextPutAll:s. |
2423 ] |
2437 ] |
2424 ]. |
2438 ]. |
2425 aStream cr |
2439 aStream cr |
2426 |
2440 |
2427 "Created: 4.1.1997 / 20:38:16 / cg" |
2441 "Created: 4.1.1997 / 20:38:16 / cg" |
2428 "Modified: 4.1.1997 / 21:06:42 / cg" |
2442 "Modified: 23.1.1997 / 02:06:18 / cg" |
2429 ! |
2443 ! |
2430 |
2444 |
2431 basicFileOutInstvarTypeKeywordOn:aStream |
2445 basicFileOutInstvarTypeKeywordOn:aStream |
2432 "a helper for fileOutDefinition" |
2446 "a helper for fileOutDefinition" |
2433 |
2447 |
4742 ! ! |
4756 ! ! |
4743 |
4757 |
4744 !Class class methodsFor:'documentation'! |
4758 !Class class methodsFor:'documentation'! |
4745 |
4759 |
4746 version |
4760 version |
4747 ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.246 1997-01-20 11:37:17 cg Exp $' |
4761 ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.247 1997-01-23 01:08:18 cg Exp $' |
4748 ! ! |
4762 ! ! |
4749 Class initialize! |
4763 Class initialize! |