eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ClassOrganizer':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: ClassOrganizer


Inheritance:

   Object
   |
   +--ClassOrganizer

Package:
stx:libbasic3
Category:
Kernel-Support
Version:
rev: 1.23 date: 2018/02/15 18:04:04
user: stefan
file: ClassOrganizer.st directory: libbasic3
module: stx stc-classLibrary: libbasic3
Author:
Claus Gittinger

Description:


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.


Class protocol:

defaults
o  defaultProtocol

instance creation
o  for: aClass
create & return a new instance of myself, to organize aClass


Instance protocol:

Compatibility-Squeak
o  commentStamp
( an extension from the stx:libcompat package )

accessing
o  addCategory: aCategory
ignored.
usage example(s):
     Number organization addCategory:'foo'. 

o  addCategory: aCategory before: symbolOrNil
ignored.

o  categories
return a collection of my classes method-categorySymbols
usage example(s):
     SmallInteger organization categories 

o  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:#==   

o  classComment
return the classes comment
usage example(s):
     Number organization classComment  

o  elements
return a collection of my classes selectors
usage example(s):
     SmallInteger organization elements 

o  listAtCategoryNamed: aCategorySymbol
return a collection of selectors whose methods are categorized
as aCategorySymbol
usage example(s):
     SmallInteger organization listAtCategoryNamed:#arithmetic 

o  removeCategory: aCategory
remove a categories assignments - dummy here

change & update
o  update: something with: parameter from: changedObject
(comment from inherited method)
dependent is notified of some change -
Default is to try update:with:

changing
o  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)'

o  classify: aSelector under: aCategory
change the category of the method stored under aSelector
to aCategory.

printing & storing
o  printOn: aStream
Number organization printString

private access
o  class: aClass
set the class



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 19 Nov 2018 00:42:18 GMT