|
Class: ClassOrganizer
Object
|
+--ClassOrganizer
- Package:
- stx:libbasic3
- Category:
- Kernel-Support
- Version:
- rev:
1.26
date: 2024/02/29 13:37:46
- user: cg
- file: ClassOrganizer.st directory: libbasic3
- module: stx stc-classLibrary: libbasic3
in contrast to other smalltalks, ST/X does not keep the
method <-> category associations in the class (as organization),
but instead keeps the category as an instance variable of methods.
For compatibility with (fileOut-) files which include a class organization
message, 'aClass organization' returns an instance of this class, which
implements the category change functionality.
Also, some PD code seems to use & define methods for ClassOrganizers
- having this (somewhat dummy) class around helps to fileIn that code.
Notice, that instances of ClassOrganizer are NOT used in the current ST/X
system; all of this is pure compatibility mimicri.
This is an additional goody class; therefore:
THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTOR ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTOR BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
copyrightCOPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
defaults
-
defaultProtocol
-
instance creation
-
for: aClass
-
create & return a new instance of myself, to organize aClass
Compatibility-Squeak
-
commentStamp
( an extension from the stx:libcompat package )
-
accessing
-
addCategory: aCategory
-
ignored.
Usage example(s):
Number organization addCategory:'foo'.
|
-
addCategory: aCategory before: symbolOrNil
-
ignored.
-
categories
-
return a collection of my classes method-categorySymbols
Usage example(s):
SmallInteger organization categories
|
-
categoryOfElement: aSelectorSymbol
-
return the category for the method specified by aSelectorSymbol.
Return nil, if there is no such method.
Usage example(s):
Number organization categoryOfElement:#foo.
Object organization categoryOfElement:#==
|
-
classComment
-
return the classes comment
Usage example(s):
Number organization classComment
|
-
elements
-
return a collection of my classes selectors
Usage example(s):
SmallInteger organization elements
|
-
listAtCategoryNamed: aCategorySymbol
-
return a collection of selectors whose methods are categorized
as aCategorySymbol
Usage example(s):
SmallInteger organization listAtCategoryNamed:#arithmetic
|
-
removeCategory: aCategory
-
remove a categories assignments - dummy here
change & update
-
update: something with: parameter from: changedObject
-
(comment from inherited method)
dependent is notified of some change -
Default is to try update:with:
changing
-
changeFromString: organizationString
-
take category<->selector associations from aString, and change
the categories of those methods.
Only required when filing in ST-80 code, which changes the categorization
this way.
Usage example(s):
TestClass
organization
changeFromString:'( ''category1'' #foo1 #foo2 foo3)
( ''category2'' #bar1 #bar2)'
|
-
classify: aSelector under: aCategory
-
change the category of the method stored under aSelector
to aCategory.
printing & storing
-
printOn: aStream
-
Number organization printString
private access
-
class: aClass
-
set the class
|