eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Class':

Home

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

Class: Class


Inheritance:

   Object
   |
   +--Behavior
      |
      +--ClassDescription
         |
         +--Class
            |
            +--JavaScriptClass
            |
            +--SmalltalkShareClient::RemoteClass
            |
            +--Trait

Package:
stx:libbasic
Category:
Kernel-Classes
Version:
rev: 1.761 date: 2024/02/25 13:14:09
user: cg
file: Class.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


Class adds more functionality to classes; minimum stuff has already
been defined in Behavior and ClassDescription; this adds naming, categories etc.

[Instance variables:]

    name            <Symbol>                    the classes name

    category        <Symbol>                    the classes category

    classvars       <String>                    the names of the class variables;
                    | <Collection of words>     initially, stc generates a string; this is converted on the fly
                                                to an array of names. In the future, stc may be changed.

    comment         <String>                    the classes comment; either a string,
                                                a number specifying the offset in classFilename, or nil

    subclasses      <Collection>                cached collection of subclasses
                                                (not used for execution, but for the IDE to speed up certain operations)

    classFilename   <String>                    the file (or nil) where the classes' sources are found

    package         <Symbol>                    the package, in which the class was defined (inserted by compilers)

    revision        <String>                    revision string - inserted by stc

    environment     <Symbol | nil>              cached environment (i.e. Smalltalk or a namespace)

    signature       <SmallInteger>              the classes signature (used to detect obsolete or changed classes with binaryStorage)
                                                This is filled in lazy - i.e. upon the first signature query.

    attributes   <Array | nil>                  describes primitiveIncludes, primitiveFunctions etc.
                                                also a place to add additional attributes, without a need to recompile all classes.


WARNING: layout known by compiler and runtime system

[note:]
    the subclasses instvar keeps a cached collection of the known subclasses in the system.
    this cache is lazyly flushed when a SubclassCacheSequenceNumber comparison detects a mismatch.
    (this seqNr is incremented, whenever something in any class hierarchy changes).
    This is a q&d mechanism to allow for no-overhead fileIn and package loading,
    and reasonable speedup in the hierarchy walkers (i.e. the browsers).
    (flushing all is obviously too much flushing, and we could do better in many situations)

copyright

COPYRIGHT (c) 1989 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.

Class protocol:

accessing-flags
o  tryLocalSourceFirst
if true (now the default), local source files are tried first, before a sourceCodemanager is
consulted. This may speed up the source access, but adds some insecurity, because
the sourceCodemanager is always getting the source for the classes correct version.
In contrast, the local file might be different from (edited in an external tool) in
the meantime. You have been warned - better leave it false (the sourceCodemanager will
fill its cache and eventually be just as fast...)

o  tryLocalSourceFirst: aBoolean
if true (which is the default), local source files are tried first, before a sourceCodemanager is
consulted. This may speed up the source access, but adds some insecurity, because
the sourceCodemanager is always getting the source for the classes correct version.
In contrast, the local file might be different from (edited in an external tool) in
the meantime. You have been warned - better leave it false (the sourceCodemanager will
fill its cache and eventually be just as fast...)

o  updateChanges: aBoolean
turn on/off changes management. Return the prior value of the flag.
This value is used as a default fallback - a querySignal handler may still
decide to return something else.

o  updatingChanges
return true if changes are recorded.
The value returned here is the default fallback - a querySignal handler may still
decide to return something else.

creating new classes
o  name: newName
this new instance creation protocol may be used in scripts to replace the traditional inst-creation messages

o  name: newName instanceVariableNames: stringOfInstVarNames
this new instance creation protocol may be used in scripts to replace the traditional inst-creation messages

o  name: newName subclassOf: aClass
this new instance creation protocol may be used in scripts to replace the traditional inst-creation messages

o  name: newName subclassOf: aClass instanceVariableNames: stringOfInstVarNames
this new instance creation protocol may be used in scripts to replace the traditional inst-creation messages

o  name: newName subclassOf: aClass instanceVariableNames: stringOfInstVarNames category: categoryString
this new instance creation protocol may be used in scripts to replace the traditional inst-creation messages

o  name: newName subclassOf: aClass instanceVariableNames: stringOfInstVarNames classVariableNames: stringOfClassVarNames category: categoryString
this new instance creation protocol may be used in scripts to replace the traditional inst-creation messages

o  name: newName subclassOf: aClass instanceVariableNames: stringOfInstVarNames classVariableNames: stringOfClassVarNames classInstanceVariableNames: stringOfClassInstVarNames poolDictionaries: stringOfPoolNames category: categoryString
this new instance creation protocol may be used in scripts to replace the traditional inst-creation messages

o  name: newName subclassOf: aClass instanceVariableNames: stringOfInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames category: categoryString
this new instance creation protocol may be used in scripts to replace the traditional inst-creation messages

o  undeclared: name
Creates an 'undeclared' class, a placeholder for
superclass when loading/filing-in a class whose
superclass does not exist yet.

helpers
o  nameWithoutPrefix: name
helper for fileOut and others - return a name's printString,
without any owningClass or nameSpace prefix

Usage example(s):

a public class:
     Class nameWithoutPrefix:'Array'
     Class nameWithoutPrefix:'Tools::Array'

o  revisionInfoFromString: aString
return a revision info, given a string.
This extracts the relevant info from aString, asking
the default sourceCode manager (if there is one).
Notice, that this method is only invoked, if a class does not know
its sourceCode manager.

o  revisionStringFromSource: aMethodSourceString
extract a revision string from a method's source string.
Caveat: Assumes CVS.

misc
o  template: aCategoryString
return a class-definition template

private
o  flushSubclassInfo
throw away (forget) the cached subclass information,
as created by #subclassInfo.
This is private protocol

Usage example(s):

     Class flushSubclassInfo

o  flushSubclassInfoFor: aClass
throw away (forget) the cached subclass information for aClass,
as created by #subclassInfo.
This is private protocol

Usage example(s):

     Class flushSubclassInfoFor:View

queries
o  isBuiltInClass
return true if this class is known by the run-time-system.
Here, true is returned for myself, false for subclasses.


Instance protocol:

Compatibility-Dolphin
o  defaultCategoryForDolphinClasses
used only when filing in Dolphin classes (which do not provide a category in their inst creation message)

o  guid

o  guid: aUUID
(comment from inherited method)
Compatibility method - do not use in new code.
An ignored dummy; for Dolphin compatibility.

o  stb_version

o  subclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s classInstanceVariableNames: classInstanceVariableNames
this method allows fileIn of Dolphin classes

o  variableSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s classInstanceVariableNames: classInstanceVariableNames
this method allows fileIn of Dolphin classes

Compatibility-ST/V and V'Age
o  defaultCategoryForSTVorVAGEClasses
used only when filing in ST/V and V'Age classes (which do not provide a category in their inst creation message)

o  subclass: nm classInstanceVariableNames: cIV instanceVariableNames: iV classVariableNames: cV poolDictionaries: p
this method allows fileIn of ST/V and V'Age classes

o  subclass: nm instanceVariableNames: iV classVariableNames: cV poolDictionaries: pD
this method allows fileIn of ST/V and V'Age classes
(which seem to have no category)

o  variableByteSubclass: t classVariableNames: d poolDictionaries: s
this method allows fileIn of ST/V and V'Age variable byte classes
(which seem to have no category and no instvars)

o  variableLongSubclass: t classVariableNames: d poolDictionaries: s
this method allows fileIn of ST/V and V'Age variable long (32bit integers) classes
(which seem to have no category and no instvars)

o  variableSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s
this method allows fileIn of ST/V and V'Age variable pointer classes
(which seem to have no category)

o  variableWordSubclass: t classVariableNames: d poolDictionaries: s
this method allows fileIn of ST/V and V'Age variable word (16bit integers) classes
(which seem to have no category and no instvars)

Compatibility-ST80
o  classPool
return something which allows access to my classVariables via
#at: and #at:put: messages.

Usage example(s):

     Button classPool

o  fileOutSourceOn: aStream

o  rename: newName
same as renameTo: - for ST80 compatibility

Compatibility-Squeak
o  bindingOf: aName
( an extension from the stx:libcompat package )
return the binding of a name - either a class var, a private class, or a pool value

Usage example(s):

JV@2011-10-23: In Squeak/Pharo, bindingOf: returns
     nil if no binding is found. Some code depends on this
     behavior

o  classComment: comment stamp: commentStamp

o  commentStamp: stampString prior: priorVersion
(comment from inherited method)
return a ClassCategoryReader to read in and compile methods for me.
This was added to allow squeak code to be filedIn.

o  objectForDataStream: stream
( an extension from the stx:libcompat package )

o  storeDataOn: stream
( an extension from the stx:libcompat package )
(comment from inherited method)
Store myself on a DataStream.
Answer self.
This is a low-level DataStream/ReferenceStream method.
See also objectToStoreOnDataStream.
NOTE: This method must send 'aDataStream beginInstance:size:' and then (nextPut:/nextPutWeak:) its subobjects.
readDataFrom:size: reads back what we write here.

o  ultimateSourceCodeAt: aSelector ifAbsent: exceptionalValue
( an extension from the stx:libcompat package )
Return the source code at selector, deferring to superclass if necessary

Usage example(s):

     Array ultimateSourceCodeAt:#class ifAbsent:[nil]
     Array ultimateSourceCodeAt:#foo ifAbsent:[nil]

Compatibility-VW
o  defineSharedVariable: name private: private constant: constant category: category initializer: initializer
must add to the class-initialize method:

o  defineStatic: name private: private constant: constant category: category initializer: initializer attributes: annotations

o  sortedSubclasses

accessing
o  addClassVarName: aStringOrSymbol
add a class variable if not already there and initialize it with nil.
Also writes a change record and notify dependents.

o  addClassVarNames: aCollectionOfStrings
add a number of class variables if not already there and initialize them with nil.
Also writes a change record and notifies dependents.

o  allPrivateClasses
return a collection of all private classes and private-private classes.
The classes are in any order.

o  category
return the category of the class.
The returned value may be a string or symbol.

Usage example(s):

     Point category
     Dictionary category

o  category: aStringOrSymbol
set the category of the class to be the argument, aStringOrSymbol.
Sends out change notifications, so browers can update

o  classBaseFilename
return the baseName of the file from which the class was compiled.
In contrast to classFilename, this will always be a plain basename.

o  classFilename
return the name of the file from which the class was compiled.
If the class was loaded via an explicit load (i.e. from the fileBrowser),
this will be an absolute path. Oherwise, it will be a basename only.
See classBaseFilename for a method which always returns the basename.

Usage example(s):

     SVN::Repository classFilename
     Array classFilename

o  classNamed: aClassNameStringOrSymbol
return a private class if present; nil otherwise.
Added for protocol compatibilty with NameSpace and Smalltalk

o  classVarAt: aSymbolOrNameString
return the value of a class variable.
Currently, this returns nil if there is no such classvar -
this may change.

Usage example(s):

     Object classVarAt:#UserInterruptSignal
     Object classVarAt:'UserInterruptSignal'

o  classVarAt: aSymbol ifAbsent: exceptionBlock
return the value of a class variable.
Currently, this returns nil if there is no such classvar -
this may change.

o  classVarAt: aSymbolOrString put: something
store something in a classvariable.
Currently this creates a global with a funny name if no such
classVar exists - this may change.

o  classVarNames
return a collection of the class variable name-strings.
Only names of class variables defined in this class are included
in the returned collection - use allClassVarNames, to get all known names.
Traditionally, this was called classVarNames, but newer versions of squeak
seem to have changed to use classVariableNames.
So you probably should use the alias

Usage example(s):

     Object classVarNames
     Float classVarNames

o  classVariableString
return a string of the class variables names.
Only names of class variables defined in this class are in the
returned string.

Usage example(s):

     Object classVariableString
     Float classVariableString

o  classVariableString: aString
set the classes classvarnames string;
Initialize new class variables with nil, clear and remove old ones.
No change record is written and no classes are recompiled.

o  comment
return the comment (aString) of the class

Usage example(s):

the comment is either a string, or an integer specifying the
     position within the classes sourcefile ...

Usage example(s):

     Object comment
     RunArray comment

o  comment: aStringOrNil
set the comment of the class to be the argument, aString;
create a change record and notify dependents.

o  containingNameSpace
return the namespace I am really contained in;
For private or anonymous classes, nil is returned -
for public classes, Smalltalk is returned.

o  environment
return the namespace I am contained in; ST-80 compatible name

o  generateClassFilename
generate the expected filename for this class - without suffix.
This may be different from the actual classFilename

Usage example(s):

     Complex generateClassFilename
     HTML::AbstractElement generateClassFilename

o  getClassFilename
return the name of the file from which the class was compiled.
If the class was loaded via an explicit load (i.e. from the fileBrowser),
this will be an absolute path. Oherwise, it will be a basename only.

o  getPackage
get the package or nil.

o  globalKeyForClassVar: aStringOrSymbol
this helps to encapsulate the (current) implementation of classVariables
from the outside world. Currently, classvars are stored in
the Smalltalk dictionary with a funny name, since there are
no classPools yet.

o  name
return the name of the class.
This returns a symbol (but notice, that other smalltalks might return a string).

o  nameSpace
return the namespace I am contained in;
For public classes, Smalltalk is returned.
For private classes, the owning class is returned.
For anonymous classes, nil should be returned - but for now, this also returns Smalltalk;
but will change in the future to return nil then.
This is left in for a while (because many users of this method expect a non-nil return value).
In the meantime, use containingNameSpace, which provides the correct answer

Usage example(s):

     Expecco::KeyFile::Extension setEnvironment:nil. 
     Expecco::KeyFile::Extension nameSpace 
     Expecco::KeyFile::Extension containingNameSpace 

o  package
return the package-symbol of the class.

Usage example(s):

     Object package

o  package: aSymbol
set the package-symbol of the class.
Sends out change notifications, so browers can update

o  poolDictionaries
this returns the concatenated pool name string

o  primitiveDefinitions: aString
set the primitiveDefinition string

o  primitiveDefinitionsString
return the primitiveDefinition string or nil

Usage example(s):

     Object primitiveDefinitionsString
     String primitiveDefinitionsString

o  primitiveDefinitionsStringOrDefault
return the primitiveDefinition string or a default

Usage example(s):

     Object primitiveDefinitionsStringOrDefault
     String primitiveDefinitionsStringOrDefault
     ExternalStream primitiveDefinitionsStringOrDefault

o  primitiveFunctions: aString
set the primitiveFunction string

o  primitiveFunctionsString
return the primitiveFunctions string or nil

o  primitiveFunctionsStringOrDefault
return the primitiveFunction string or a default

Usage example(s):

     Object primitiveFunctionsStringOrDefault
     String primitiveFunctionsStringOrDefault
     ExternalStream primitiveFunctionsStringOrDefault

o  primitiveVariables: aString
set the primitiveVariable string

o  primitiveVariablesString
return the primitiveVariables string or nil

o  primitiveVariablesStringOrDefault
return the primitiveVariable string or a default

Usage example(s):

     Object primitiveVariablesStringOrDefault
     String primitiveVariablesStringOrDefault
     ExternalStream primitiveVariablesStringOrDefault

o  privateClassNamed: aClassNameStringOrSymbol

o  privateClasses
return a collection of my private classes (empty, if I have none).
The classes are in any order.

Usage example(s):

     Object privateClasses
     ObjectMemory privateClasses
     UILayoutTool privateClasses

o  privateClassesAt: aClassNameStringOrSymbol
return a private class if present; nil otherwise

o  privateClassesAt: aClassNameStringOrSymbol put: aClass
add a private class

o  privateClassesOrAll: allOfThem
return a collection of my direct private classes (if any)
or direct plus indirect private classes (if allOfThem).
An empty collection if there are none.
The classes are in no particular order.

Usage example(s):

     UILayoutTool privateClassesOrAll:true
     UILayoutTool privateClassesOrAll:false

o  privateClassesSorted
return a collection of my private classes (if any).
The classes are sorted by inheritance.

Usage example(s):

     Object privateClassesSorted
     Class privateClassesSorted
     Class privateClasses

o  projectDefinition
return the project definition of the classes package

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  projectDefinitionClass
return the project definition of the classes' package.
Eg. for Array, this would return the stx_libbasic project definition class.

Usage example(s):

     Object projectDefinitionClass productVersion
     DAPASX::DapasUI projectDefinitionClass productVersion

o  realSharedPoolNames
this returns the namespace aware pool names

o  realSharedPools
this returns the namespace aware pools

Usage example(s):

     Croquet::OpenGL sharedPools
     Croquet::OpenGL realSharedPools

     Win32OperatingSystem realSharedPools
     Win32OperatingSystem realSharedPoolNames

o  removeClassVarName: aString
remove a class variable if not already there.
Also writes a change record and notifies dependents.

o  setCategory: aStringOrSymbol
set the category of the class to be the argument, aStringOrSymbol.
Does NOT send out change notifications (so browers will NOT update)

o  setClassFilename: aFilename
set the classes filename.
This is a dangerous (low level) operation,
since the comment and primitiveSpecs may no longer be accessible,
if a wrong filename is set here.

o  setClassVariableString: aString
set the classes classvarnames string.
This is a dangerous (low level) operation, since the
classvariables are not really created or updated. Also,
NO change record is written.

o  setComment: aString
set the comment of the class to be the argument, aString;
do NOT create a change record

o  setComment: com category: categoryStringOrSymbol
set the comment and category of the class;
do NOT create a change record

o  setEnvironment: aNamespace
set the namespace I am contained in; ST-80 compatible name

o  setPackage: aSymbol
set the package of the class.
Does NOT send out change notifications (so browers will NOT update)

o  sharedPoolNames
this returns a collection of the plain (non-namespace aware) pool names.
Read the comment in sharedPools on why this is done.

Usage example(s):

     ZipArchive sharedPoolNames
     OSI::ASN1_Coder sharedPoolNames
     Croquet::OpenGL sharedPoolNames
     OpenGLRenderingContext sharedPoolNames
     Character sharedPoolNames
     Win32OperatingSystem sharedPoolNames

o  sharedPoolNames: aStringOrCollection
set the sharedPools string (no change notifications)
Does NOT send out change notifications (so browers will NOT update)

o  sharedPools: aCollection
set the sharedPools expects the real pools (i.e. the PoolDictionaries)

o  source
return the classes full source code

o  sourceCodeManager
Return my (configured) source code manager.

Usage example(s):

     Array sourceCodeManager
     foo_p1 sourceCodeManager

o  sourceCodeManagerFromBinaryRevision
Returns the source code manager that should be used for
source code access based in class's binary revision.
If no binary revision is available, then the configured source
code manager is returned.
If source code management is disabled,
or a particular source code manager is not enabled, return nil.

The source code manager for source access may differ from the
configured source code manager:

- #sourceCodeManager returns the manager use has configured for
this class using preferences

- #sourceCodeManagerForSourceAccess is the manager used when asking
for class source code. It compares version_XXX methods with
the class's binary revision and. When method_XXX matches the
binary revision string, XXX source code manager is returned,
as this class has been likely compiled from a source checked out
using returned source code manager

CAVEAT: Now, the code expects that the revision string is in
the format '$revision ident$SCM'. It won't work for managers that
do not use dollar expansion. For now, only CVS, SVN and Perforce
are used so this code should work

o  subclasses
return a collection of the direct subclasses of the receiver

Usage example(s):

subclasses may still be nil - obsolete classes may not be updated

Usage example(s):

     Class flushSubclassInfo.
     Class subclasses.
     SmallInteger subclasses

o  superclass: aClass
set the superclass - this actually creates a new class,
recompiling all methods for the new one. The receiving class stays
around anonymously to allow existing instances some life.
This may change in the future (adjusting existing instances)

o  traitUsers
Trait traitUsers

o  traitUsers: aSetOrNi
Trait traitUsers

o  withAllPrivateClasses
return a collection containing the receiver plus all of my private classes (if any).
This also inclueds all private classes of private classes, recursively.
Elements are in no particular order.

adding & removing
o  removeFromSystem
ST-80 compatibility
remove myself from the system

o  unload
if the receiver was autoloaded, unload and reinstall it as
autoloaded. Can be used to get rid of no longer needed autoloaded
classes.
(maybe, autoloaded classes should unload themselfes when no
longer needed - for example, after some delay when the last instance
is gone ...)

Usage example(s):

if the receiver was autoloaded, unload and reinstall it as
     autoloaded. Can be used to get rid of no longer needed autoloaded
     classes.
     (maybe, autoloaded classes should unload themselfes when no
      longer needed - for example, after some delay when the last instance
      is gone ...)

Usage example(s):

cannot unload, if non-autoloaded subclasses exist ...

Usage example(s):

     Clock open.
     Clock unload.
     ClockView unload.
     Clock open

changes management
o  addChangeRecordForChangeCategory
add a category change

o  addChangeRecordForClass: aClass
add a class-definition-record to the changes file

o  addChangeRecordForClass: aClass andNotifyChangeOf: aspect
writes a change record and notifies dependents.

o  addChangeRecordForClassCheckIn: aClass
append a class-was-checkedIn-record to the changes file

o  addChangeRecordForClassComment: aClass
add a class-comment-record to the changes file

o  addChangeRecordForClassContainerRemove: aClass
append a container-was-removed-record to the changes file

o  addChangeRecordForClassFileOut: aClass
append a class-was-filedOut-record to the changes file

o  addChangeRecordForClassInstvars: aClass
add a class-instvars-record to the changes file

o  addChangeRecordForClassRemove
add a class-remove-record to the changes file

o  addChangeRecordForClassRemove: oldClassName
add a class-remove-record to the changes file

o  addChangeRecordForClassRename: oldName to: newName
add a class-rename-record to the changes file

o  addChangeRecordForClassTagged: aClass asBranch: asBranch symbolicName: symbolicVersionTag
append a class-was-tagged-record to the changes file

o  addChangeRecordForPrimitiveDefinitions: aClass
add a primitiveDefinitions-record to the changes file

o  addChangeRecordForPrimitiveFunctions: aClass
add a primitiveFunctions-record to the changes file

o  addChangeRecordForPrimitiveVariables: aClass
add a primitiveVariables-record to the changes file

o  addChangeRecordForSnapshot: aFileName
add a snapshot-record to the changes file

o  addChangeRecordForSnapshot: aFileName to: aStream
add a snapshot-record to aStream

enumerating
o  allPrivateClassesDo: aBlock
evaluate aBlock on all of my private classes (if any).
Evaluation is in no particular order.

o  privateClassesDo: aBlock
evaluate aBlock on all of my (immediate) private classes (if any).
Evaluation is in no particular order.

o  subclassesDo: aBlock
evaluate the argument, aBlock for all immediate subclasses.
This will only enumerate globally known classes - for anonymous
behaviors, you have to walk over all instances of Behavior.

Usage example(s):

     Collection subclassesDo:[:c | Transcript showCR:(c name)]

o  withAllPrivateClassesDo: aBlock
evaluate aBlock on myself and all of my private classes (if any).
This recurses into private classes of private classes.
Evaluation is in no particular order.

fileIn interface
o  primitiveDefinitions
this method allows fileIn of classes with primitive code.

It returns a CCReader which reads the next chunks and installs the
unprocessed contents in the classes primitiveDefinitions section.
Thus, although the definitions are NOT processed, they are still visible,
editable and especially: not lost when filing out the class.

o  primitiveFunctions
this method allows fileIn of classes with primitive code.

It returns a CCReader which reads the next chunks and installs the
unprocessed contents in the classes primitiveFunctions section.
Thus, although the functions are NOT processed, they are still visible,
editable and especially: not lost when filing out the class.

o  primitiveVariables
this method allows fileIn of classes with primitive code.

It returns a CCReader which reads the next chunks and installs the
unprocessed contents in the classes primitiveVariables section.
Thus, although the variables are NOT processed, they are still visible,
editable and especially: not lost when filing out the class.

fileOut
o  basicFileOutDefinitionOn: aStream withNameSpace: forceNameSpace
append an expression on aStream, which defines myself.

o  basicFileOutDefinitionOn: aStream withNameSpace: forceNameSpace withPackage: showPackage
append an expression on aStream, which defines myself.

o  basicFileOutDefinitionOn: aStream withNameSpace: forceNameSpace withPackage: showPackage syntaxHilighting: syntaxHilighting
append an expression on aStream, which defines myself.

o  basicFileOutInstvarTypeKeywordOn: aStream
a helper for fileOutDefinition

o  fileOut
create a file 'class.st' consisting of all methods in myself in
sourceForm, from which the class can be reconstructed (by filing in).
If the current project is not nil, create the file in the projects
directory. Care is taken, to not clobber any existing file in
case of errors (for example: disk full).
Also, since the classes methods need a valid sourcefile, the current
sourceFile may not be rewritten.

o  fileOutAllMethodsOn: aStream

o  fileOutAllMethodsOn: aStream methodFilter: methodFilter

o  fileOutAs: filenameString
create a file consisting of all methods in myself in
sourceForm, from which the class can be reconstructed (by filing in).
The given fileName should be a full path, including suffix.
Care is taken, to not clobber any existing file in
case of errors (for example: disk full).
Also, since the classes methods need a valid sourcefile, the current
sourceFile may not be rewritten.

o  fileOutClassInstVarDefinitionOn: aStream
append an expression to define my classInstanceVariables on aStream

o  fileOutClassInstVarDefinitionOn: aStream withNameSpace: withNameSpace
append an expression to define my classInstanceVariables on aStream

o  fileOutCommentOn: aStream
append an expression on aStream, which defines my comment

o  fileOutDefinitionOn: aStream
append an expression on aStream, which defines myself.

o  fileOutIn: aDirectoryName
create a file 'class.st' consisting of all methods in self in
directory aDirectoryName (ignoring any directory setting in
the current project).
This is not logged in that change file (should it be ?).
Returns the fileName into which the class was stored

Usage example(s):

        self fileOutIn:'/tmp'
        self fileOutIn:'/tmp/doesNotExistBla'
        self fileOutIn:'/tmp' asFilename

o  fileOutIn: aDirectoryName withTimeStamp: withTimeStamp
create a file 'class.st' consisting of all methods in self in
directory aDirectoryName (ignoring any directory setting in
the current project).
This is not logged in that change file (should it be ?).
Returns the fileName into which the class was stored

Usage example(s):

        self fileOutIn:'/tmp'
        self fileOutIn:'/tmp/doesNotExistBla'
        self fileOutIn:'/tmp' asFilename

o  fileOutOn: aStream
file out my definition and all methods onto aStream

o  fileOutOn: aStream withTimeStamp: stampIt
file out my definition and all methods onto aStream.
If stampIt is true, a timeStamp comment is prepended.

o  fileOutOn: aStream withTimeStamp: stampIt withInitialize: initIt
file out my definition and all methods onto aStream.
If stampIt is true, a timeStamp comment is prepended.
If initIt is true, and the class implements a class-initialize method,
append a corresponding doIt expression for initialization.

o  fileOutOn: aStream withTimeStamp: stampIt withInitialize: initIt withDefinition: withDefinition methodFilter: methodFilter
file out my definition and all methods onto aStream.
If stampIt is true, a timeStamp comment is prepended.
If initIt is true, and the class implements a class-initialize method,
append a corresponding doIt expression for initialization.
The order by which the fileOut is done is used to put the version string at the end.
Thus, if the version string is expanded (by CVS), the characterPositions of methods should not move

o  fileOutOn: outStreamArg withTimeStamp: stampIt withInitialize: initIt withDefinition: withDefinition methodFilter: methodFilter encoder: encoderOrNil
file out my definition and all methods onto aStream.
If stampIt is true, a timeStamp comment is prepended.
If initIt is true, and the class implements a class-initialize method,
append a corresponding doIt expression for initialization.
The order by which the fileOut is done is used to put the version string at the end.
Thus, if the version string is expanded (by CVS), the characterPositions of methods should not move

o  fileOutPrimitiveDefinitionsOn: aStream
append primitive defs (if any) to aStream.

o  fileOutPrimitiveFunctionsOn: aStream
primitive functions - if any

o  fileOutPrimitiveSpecsOn: aStream
append primitive defs (if any) to aStream.

fileOut-binary
o  binaryFileOut
create a file 'class.cls' (in the current projects fileOut-directory),
consisting of all methods in myself in a portable binary format.
The methods sources are saved by reference
to the classes sourceFile if there is any.
That sourcefile needs to be present after reload in order to be
browsable.

o  binaryFileOutOn: aStream
append a binary representation of myself to aStream

o  binaryFileOutWithSourceMode: sourceMode
create a file 'class.cls' (in the current projects fileOut-directory),
consisting of all methods in myself in a portable binary format.
The argument controls how sources are to be saved:
#keep - include the source
#reference - include a reference to the sourceFile
#discard - don't save sources.

With #reference, the sourceFile needs to be present after reload
in order to be browsable.

o  binaryFileOutWithSourceMode: sourceMode as: fileNameString
create a file fileNameString,
consisting of all methods in myself in a portable binary format.
The argument controls how sources are to be saved:
#keep - include the source
#reference - include a reference to the sourceFile
#discard - don't save sources.

With #reference, the sourceFile needs to be present after reload
in order to be browsable.

fileOut-xml
o  fileOutXML
create a file 'class.xml' consisting of all methods in myself in
XML sourceForm.
If the current project is not nil, create the file in the projects
directory. Care is taken, to not clobber any existing file in
case of errors (for example: disk full)

Usage example(s):

     Class fileOutXML

o  fileOutXMLAllDefinitionsOn: aStream
append xml expressions on aStream, which defines myself and all of my private classes.

o  fileOutXMLAllMethodsOn: aStream methodFilter: methodFilter

o  fileOutXMLAs: fileNameOrString
create a file consisting of all methods in myself in
XML sourceForm.
The given fileName should be a full path, including suffix.

Usage example(s):

     Class fileOutXMLAs:'test.xml'
     Class fileOutXMLAs:'/blaDoesNotExist/test.xml'

o  fileOutXMLDefinitionOn: aStream
append an xml expression on aStream, which defines myself.

o  fileOutXMLOn: aStream
WARNING: untested first version. Not for general use (yet)
file out my definition and all methods onto aStream in XML format.

o  fileOutXMLOn: aStream withTimeStamp: stampIt withInitialize: initIt withDefinition: withDefinition methodFilter: methodFilter
WARNING: untested first version. Not for general use (yet)
file out my definition and all methods onto aStream in XML format.
If stampIt is true, a timeStamp comment is prepended.
If initIt is true, and the class implements a class-initialize method,
append a corresponding doIt expression for initialization.
The order by which the fileOut is done is used to put the version string at the end.
Thus, if the version string is expanded (by CVS), the characterPositions of methods should not move

Usage example(s):

     Class
        fileOutXMLOn:'test.xml' asFilename writeStream
        withTimeStamp:true
        withInitialize:true
        withDefinition:true
        methodFilter:nil

inspecting
o  inspector2TabDocumentation
( an extension from the stx:libtool package )
Array inspect

misc ui support
o  defaultIconForAboutBox
( an extension from the stx:libwidg package )

o  inspectorClass
( an extension from the stx:libtool package )
redefined to launch a ClassInspector, which knows about classVariables
(instead of the default InspectorView).

printing & storing
o  htmlDocumentation

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  printClassVarNamesOn: aStream indent: indent
print the class variable names indented and breaking at line end

o  printFullHierarchyOn: aStream indent: indent
print myself and all subclasses on aStream.
recursively calls itself to print subclasses.
Can be used to print hierarchy on the printer.

Usage example(s):

|printStream|
     printStream := Printer new.
     Object printFullHierarchyOn:printStream indent:0.
     printStream close

o  printOutDefinitionOn: aPrintStream
print out my definition

o  printOutOn: aPrintStream
print out all methods on aPrintStream which should be a printStream

o  printOutProtocolOn: aPrintStream

o  printSharedPoolNamesOn: aStream indent: indent
print the pool names indented and breaking at line end

o  storeOn: aStream
append my name only - expects class to be there, when restoring

private-accessing
o  attributes
return the extra class attributes or nil

o  attributes: aClassAttributesObject
set the extra class attributes

o  classAttributes
return the extra class attributes or create them if nil.
Notice that the stc-compiler is too stupid to generate instances of ClassAttributes directly;
therefore, it generates arrays which are converted here, when we first access the attribute.

o  classAttributes: aClassAttributesObject
set the extra class attributes

o  classAttributesOrNil
return the extra class attributes or nil

o  flushSubclasses

o  getAttribute: aKey
get an attribute (by symbolic key)

o  getAttribute: aKey ifAbsent: exceptionValue
get an attribute (by symbolic key)

o  getSourceChunkAttribute: aKey
the attribute is either a string, or an integer specifying the
position within the classes sourcefile ...

o  setAttribute: key to: aValue
Modified (format): / 02-06-2023 / 01:05:37 / exept MBP

o  setName: aString
set the classes name - be careful, it will be still
in the Smalltalk dictionary - under another key.
This is NOT for general use - see renameTo:

o  setPrimitiveDefinitions: aString
set the primitiveDefinition string (no change notifications)

o  setPrimitiveFunctions: aString
set the primitiveFunction string (no change notifications)

o  setPrimitiveVariables: aString
set the primitiveVariable string (no change notifications)

o  setSharedPoolNames: aStringOrCollection
set the sharedPools string (no change notifications)

o  setSubclasses: aCollection

o  updateAllCachedSubclasses
Class updateAllCachedSubclasses.
Object subclasses
Array subclasses

private-changes management
o  addChangeRecordForChangeCategory: category to: aStream
append a category change record to aStream

o  addChangeRecordForClass: aClass to: aStream
append a class-definition-record to aStream

o  addChangeRecordForClassComment: aClass to: aStream
append a class-comment-record to aStream

o  addChangeRecordForClassInstvars: aClass to: aStream
append an instvars-record to aStream

o  addChangeRecordForClassRemove: oldClass to: aStream
append a class-remove-record to aStream

o  addChangeRecordForClassRename: oldName to: newName to: aStream
append a class-rename-record to aStream

o  addChangeRecordForPrimitiveDefinitions: aClass to: aStream
append a primitiveDefinitions-record to aStream

o  addChangeRecordForPrimitiveFunctions: aClass to: aStream
append a primitiveFunctions-record to aStream

o  addChangeRecordForPrimitiveVariables: aClass to: aStream
append a primitiveVariables-record to aStream

queries
o  canHaveExtensions
return true, if this class allows extensions from other packages.
Private classes, namespaces and projectDefinitions don't allow this

Usage example(s):

     Smalltalk allClasses select:[:each | each canHaveExtensions not]

o  classResources
thisContext isRecursive ifTrue:[^ ResourcePack new].

o  defaultCategoryForUncategorizedClasses
used only when the short scripting class creation messages are used

o  defaultCategoryForUndeclaredClasses

o  extensions
return a collection of extension-methods (both class and inst) from any other package,
or empty if there are none.
Unassigned methods are ignored

Usage example(s):

     CType extensions
     Rectangle extensions
     Rectangle hasExtensions
     Object extensions
     Object hasExtensions

o  extensionsFrom: aPackageID
return the set of extension-methods (both class and inst) from the given package.

Usage example(s):

     CType extensionsFrom:#'bosch:dapasx'
     Rectangle extensionsFrom:#'bosch:dapasx/support'
     Rectangle extensions
     Class extensions
     Class extensionsFrom:#'stx:libboss'

o  hasExtensions
return true, if there are methods in the receiver, which belong to
a different package (i.e. package of class ~= package of method).
Those are class extensions, which must be treated specially when checking classes
into the sourceCode repository. (extensions are stored separate).
Unassigned extensions are ignored here (i.e. as yet unpackaged changes)

Usage example(s):

     Time millisecondsToRun:[
        Smalltalk allClasses select:[:each | each hasExtensions]
     ].   

     Dictionary
        withAssociations:
            (Smalltalk allClasses
                select:[:each | each hasExtensions]
                thenCollect:[:each | each -> each extensions])

o  hasExtensionsFrom: aPackageID
return true, if there are methods in the receiver, which belong to
the package with aPackageID (i.e. package of class ~= package of method).
Those are class extensions, which must be treated specially when checking classes
into the sourceCode repository. (extensions are stored separate)

Usage example(s):

     Smalltalk allClasses
	select:[:each | each hasExtensionsFrom:'stx:goodies/refactyBrowser']
     Smalltalk allClasses
	select:[:each | each hasExtensionsFrom:'stx:libboss']

o  hasUnassignedExtensions
return true, if there are methods in the receiver, which have not been
assigned to any package.

Usage example(s):

     Time millisecondsToRun:[
        Smalltalk allClasses select:[:each | each hasUnassignedExtensions]
     ]. 190 130 260

     Dictionary
        withAssociations:
            (Smalltalk allClasses
                select:[:each | each hasUnassignedExtensions]
                thenCollect:[:each | each -> each unassignedExtensions])

o  hasUnsavedChanges
return true, if there are changes for this class in the current changeSet

Usage example(s):

     Class hasUnsavedChanges
     Array hasUnsavedChanges

o  isBrowserStartable
return true, if this is an application class,
which can be started from the browser

o  isClass
return true, if the receiver is some kind of class
(a real class, not just behavior);
true is returned here - the method is redefined from Object.
See also Behavior>>isBehavior.

Usage example(s):

     Point isClass
     1 isClass
     Behavior new isBehavior
     Behavior new isClass
     Class new isBehavior
     Class new isClass

o  isJavaScriptClass
(comment from inherited method)
return true if this is a JavaScriptClass.
false is returned here - the method is only redefined in JavaScriptClass.

o  isStartableWithMain
return true, if this is an application class,
which can be started via #main / #main:

o  isStartableWithStart
return true, if this is an application class,
which can be started via #start

o  logFacility
the 'log facility';
this is used by the Logger both as a prefix to the log message,
and maybe (later) used to filter and/or control per-facility log thresholds.
The default here is to base the facility on the classname prefixed by the package:
if the class is anywhere in the base ST/X system, 'STX' is returned as facility prefix.
Otherwise, the last component of the package name is returned as prefix.

Usage example(s):

     Array logFacility           => 'STX:Array'
     Array class logFacility     => 'STX:Array'
     Class new logFacility       => '__NoProject__:nil'
     Behavior new logFacility    => '???'

     Expecco::Browser logFacility     => 'expecco:Browser'
     Workflow::Executor logFacility   => 'workflow:Executor'

     Array package
     Array class package
     Class new package
     Behavior new package

     Expecco::Browser package
     Workflow::Executor package

o  methodsForWhich: aFilter
return a collection of methods (both class and inst) for which aFilter returns true

o  methodsWithAnyResource: aResourceSymbolCollection
ApplicationModel methodsWithAnyResource:#(fontSpec)

o  packageDirectory
return the packageDirectory of this classes package.
That is usually the directory where my source is, and where package specific additional
files (bitmaps, resources etc.) are found.
For standalone apps, nil might be returned if the package's folder is not part
of the deployed package.

Usage example(s):

      self packageDirectory
      stx_libbasic3 packageDirectory
      Array packageDirectory

o  resources
return the class's resources -
that's a ResourcePack containing national language strings

o  rootsOfTheWorld
return a collection of classes which have a nil superclass

Usage example(s):

     Class rootsOfTheWorld

o  unassignedExtensions
return a collection of methods which have not been assigned to any
any package, or empty if there are none.

Usage example(s):

     SchemeBoolean unassignedExtensions

o  wasAutoloaded
return true, if this class came into the system via an
autoload; false otherwise.
This is not an attribute of the class, but instead remembered in
Autoload. The interface here is for your convenience.

o  whichClassDefinesClassVar: aVariableName
return the class which defines the class variable named aVariableName.

Usage example(s):

     StandardSystemView whichClassDefinesClassVar:'ErrorSignal'
     StandardSystemView whichClassDefinesClassVar:'Foo'

o  whichClassDefinesPrivateClass: aClassName
return the class which defines a private class.

Usage example(s):

     Trait whichClassDefinesPrivateClass:'ClassAttributes'  
     Class whichClassDefinesPrivateClass:'ClassAttributes'  

renaming
o  makePrivateIn: newOwner
make a private class of newOwner from the receiver;
the receiver must be a public class.
Returns the new private class.

o  makePublic
make a public class from the receiver.
The receiver must be a private class.
Returns the new public class.

o  makePublicIn: newNameSpace
make a public class from the receiver.
The receiver must be a private class.
Returns the new public class.

o  renameTo: newName
change the name of the class. This does not write a change record.

** This is an obsolete interface - do not use it (it may vanish in future versions) **

signature checking
o  classinstSizeFromSignature: aSignature
for checking class compatibility: return some number based on
the classinstSize from a signature key (not always the real classinstsize).

Usage example(s):

     Class classinstSizeFromSignature:16r100. 2
     Class classinstSizeFromSignature:16r180. 3

o  instNameKeyFromSignature: aSignature
for checking class compatibility: return a number based on the
names and order of the instance variables from a signature key.

Usage example(s):

     Point instNameKeyFromSignature:Point signature.
     Association instNameKeyFromSignature:Association signature.

o  instSizeFromSignature: aSignature
for checking class compatibility: return the some number based on
the instSize from a signature key (not always the real instSize).

Usage example(s):

     Class instSizeFromSignature:Point signature.
     Class instSizeFromSignature:Association signature.
     Class instSizeFromSignature:Dictionary signature.
     Class instSizeFromSignature:16r100.

o  instTypeFromSignature: aSignature
for checking class compatibility: return some number based on
the instType (i.e. variableBytes/Pointers etc.) from a signature key.

Usage example(s):

     Class instTypeFromSignature:Object signature.
     Class instTypeFromSignature:Array signature.
     Class instTypeFromSignature:String signature.
     Class instTypeFromSignature:OrderedCollection signature.

o  signature
return a signature number - this number is useful for a quick
check for changed classes, and is done in the binary-object loader,
and the dynamic class loader.
Do NOT change the algorithm here - others may depend on it.
Also, the algorithm may change - so never interpret the returned value
(if at all, use the access #XXXFromSignature: methods)

Usage example(s):

     Array signature
     ByteArray signature
     View signature

source management
o  binaryRevision
return the revision-ID from which the class was stc-compiled;
nil if it's an autoloaded or filedIn class.
If a classes binary is up-to-date w.r.t. the source repository,
the returned string is the same as the one returned by #revision.

Usage example(s):

     Object binaryRevision
     Object class binaryRevision

o  binaryRevisionString
return the revision-ID from which the class was stc-compiled;
nil if it's an autoloaded or filedIn class.
If a classes binary is up-to-date w.r.t. the source repository,
the returned string is the same as the one returned by #revision.

Usage example(s):

     Object binaryRevisionString
     Object class binaryRevisionString

o  currentSourceStream
return an open stream on the current source of the receiver

o  findVersionMethod
return my revision method. Either this is the sourceCodeManager-specific versionMethod,
or the fallBack (for backward compatibility)

Usage example(s):

     Smalltalk allClassesDo:[:cls |
        Transcript show:cls name; show:' -> '; showCR:cls findVersionMethod
     ].

     Number findVersionMethod
     FileDirectory findVersionMethod
     Metaclass findVersionMethod
     Class findVersionMethod

o  findVersionMethodOfManager: aSourceCodemanagerOrNil
return my revision method. Either this is the sourceCodeManager-specific versionMethod,
or the fallBack (for backward compatibility)

o  lastCheckinTime
returns nil, if the info cannot be extracted (for whatever reason)

Usage example(s):

     Array lastCheckinTime

o  localSourceStreamFor: sourceFilename
return an open stream on a local sourcefile, nil if that is not available

o  nameOfOldVersionMethod
this is now more or less obsolete, as multiple sourceCodeManagers might use
different version_XXX methods. Currently, we keep this for backward compatibility.
As classes are checked in, using the new source code manager, these methods will
be removed and replaced by version_XXX methods (one per manager).

o  nameOfVersionMethod
this is now more or less obsolete, as multiple sourceCodeManagers might use
different version_XXX methods. Keep this for backward compatibility.
As classes are checked in using the new source code manager, these methods will
be removed and replaced by version_XXX methods (one per manager).

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  packageSourceCodeInfo
return the sourceCodeInfo, which defines the module and the subdirectory
in which the receiver class was built.
This info is extracted from the package id (which is added to stc-compiled classes).
This method is to be obsoleted soon, since the same info is now found
in the versionString.

The info returned consists of a dictionary
filled with (at least) values at: #module, #directory and #library.
If no such info is present in the class, nil is returned.
(this happens with autoloaded and filed-in classes)
Auotloaded classes set their package from the revisionInfo, if present.

By convention, this info is encoded in the classes package
string (which is given as argument to stc) as the last word in parentheses.
The info consists of 1 to 3 subcomponents, separated by colons.
The first defines the classes module (i.e. some application identifier),
the second defines the subdirectory within that module, the third
defines the name of the class library.
If left blank, the module info defaults to 'stx',
the directory info defaults to library name.
The library name may not be left blank.
(this is done for backward compatibility,)

For example:
'....(libbasic)' -> module: stx directory: libbasic library: libbasic
'....(stx:libbasic)' -> module: stx directory: libbasic library: libbasic
'....(stx:foo:libbfoo)' -> module: stx directory: foo library: libfoo
'....(aeg:libIECInterface)' -> module: aeg directory: libIECInterface library:libIECInterface
'....(stx:goodies/persistency:libdbase)' -> module: stx directory: goodies/persistency library:libdbase

The way how the sourceCodeManager uses this to find the source location
depends on the scheme used. For CVS, the module is taken as the -d arg,
while the directory is prepended to the file name.
Other schemes may do things differently - these are not yet specified.

Caveat:
Encoding this info in the package string seems somewhat kludgy.

Usage example(s):

     Object packageSourceCodeInfo
     View packageSourceCodeInfo
     Model packageSourceCodeInfo
     BinaryObjectStorage packageSourceCodeInfo
     MemoryMonitor packageSourceCodeInfo
     ClockView packageSourceCodeInfo

o  projectDirectory
return my package's/project's directory - that's where the sources, binaries, classLib,
resources etc. are typically found.

Usage example(s):

     Object projectDirectory
     View projectDirectory
     ApplicationModel projectDirectory

o  resourceDirectory
return the directory where my resource file is supposed to live.
Here, take the package and assume that a directory named 'resources' exists
in my package directory.
Return nil, if no such directory exists.

Usage example(s):

     Object resourceDirectory
     View resourceDirectory
     ApplicationModel resourceDirectory

o  resourcePackName
return the name which is used as the fileNameBase of my resource file.
Notice, that this will undergo the same name translation process as
done with class-source file names. (see ResourcePack).
The default here is the classes name - this can be redefined in classes
which want to use another classes resources (NewLauncher -> Launcher).

o  resourcePackage
return the package from where my resources are loaded.
By default, that is the classes package.

o  revision
return the revision-ID of the class which corresponds to the
scm-version-id of the source to which this class is equivalent.
The class's default source code manager is asked here.
Initially, this is the same as #binaryRevision; however, once changes have
been checked into a source repository, the binary continues to remain based upon
the old revision, while logically, the class has the new (checked-in) revision.
To check if a source corresponds to a compiled binary, compare this
ID with the one returned by #binaryRevision.

Usage example(s):

     Object revision
     Expecco::ReportParameterEditorForProjects revision
     Expecco::ReportParameterEditorForProjects sourceCodeManager

o  revisionDate
return the revision-Date of the class as date or nil.
This is extracted from the version string.

Usage example(s):

     Object revisionDate

Usage example(s):

verify readability:
    
     Smalltalk allClassesDo:[:cls | (cls revisionDate)]

     Smalltalk allClasses 
        select:[:cls | 
                    (cls revisionDate isNil) 
                    and:[cls isLoaded
                    and:[cls isNameSpace not]]
        ]

     Smalltalk allClasses 
        select:[:cls | cls isLoaded and:[cls isNameSpace not]]
        thenCollect:[:cls | cls -> cls revisionDate]

Usage example(s):

classes stable for more than 10 years:
    
     (Smalltalk allClasses 
        select:[:cls | cls isLoaded and:[cls isPrivate not and:[cls isNameSpace not]]])
        select:[:cls | cls revisionDate < (Timestamp now - (TimeDuration years:10))]

Usage example(s):

classes changed within the last 2 days:

     (Smalltalk allClasses 
        select:[:cls | cls isLoaded and:[cls isPrivate not and:[cls isNameSpace not]]])
        select:[:cls | cls revisionDate > (Timestamp now - 2 days)]

o  revisionDateString
return the revision-Date of the class as a string.
This is extracted from the version string.

Usage example(s):

     Object revisionDateString

o  revisionInfo
return an object filled with revision info.
This extracts the relevant info from the revisionString.
For private classes, the revisionInfo of the owning class is returned.
The revisionInfo contains all or a subset of:
binaryRevision - the revision upon which the binary of this class is based
revision - the revision upon which the class is based logically
(different, if a changed class was checked in, but not yet recompiled)
user - the user who checked in the logical revision
date - the date when the logical revision was checked in (as string)
time - the time when the logical revision was checked in (as string)
fileName - the classes source file name
repositoryPath - the classes source container

Usage example(s):

     Object revisionString
     Object revisionInfo
     Image revisionInfo
     Method::MethodWhoInfo revisionInfo

o  revisionInfoOfManager: aSourceCodemanagerOrNil
return an object filled with revision info for a given scm manager (or the default manager, if nil)
This extracts the relevant info from the revisionString.
The revisionInfo contains all or a subset of:
binaryRevision - the revision upon which the binary of this class is based
revision - the revision upon which the class is based logically
(different, if a changed class was checked in, but not yet recompiled)
user - the user who checked in the logical revision
date - the date when the logical revision was checked in
time - the time when the logical revision was checked in
fileName - the classes source file name
repositoryPath - the classes source container

o  revisionOfManager: aSourceCodemanagerOrNil
return the revision-ID of the class which corresponds to the
scm-version-id of the source to which this class is equivalent.
The passed in source code manager (or the default manager, if nil) is asked here.
Initially, this is the same as #binaryRevision; however, once changes have
been checked into a source repository, the binary continues to remain based upon
the old revision, while logically, the class has the new (checked-in) revision.
To check if a source corresponds to a compiled binary, compare this
ID with the one returned by #binaryRevision.

o  revisionString
return my revision string; that one is extracted from the
classes #version method. Either this is a method returning that string,
or it's a comment-only method and the comment defines the version.
If the receiver is unloaded, or the source is not accessible,
or no such method exists, then nil is returned.

Usage example(s):

     Smalltalk allClassesDo:[:cls |
        Transcript show:cls name; show:' -> '; showCR:cls revisionString
     ].

     Number revision
     Number revisionString
     FileDirectory revisionString
     Metaclass revisionString

o  revisionStringOfManager: aSourceCodeManagerOrNil
return my revision string; that one is extracted from the
classes #version method. Either this is a method returning that string,
or it's a comment-only method and the comment defines the version.
If the receiver is unloaded, or the source is not accessible,
or no such method exists, then nil is returned.

o  revisionTimestamp
return the revision-Date of the class as timestamp or nil.
This is extracted from the version string.

Usage example(s):

     Object revisionTimestamp

Usage example(s):

verify readability:
    
     Smalltalk allClassesDo:[:cls | (cls revisionTimestamp)]
 
     Smalltalk allClasses 
        select:[:cls | 
                    (cls revisionTimestamp isNil) 
                    and:[cls isLoaded
                    and:[cls isNameSpace not]]
        ]

     Smalltalk allClasses 
        select:[:cls | cls isLoaded and:[cls isPrivate not and:[cls isNameSpace not]]]
        thenCollect:[:cls | cls -> cls revisionTimestamp]

Usage example(s):

classes changed within the last 2 hours:
    
     (Smalltalk allClasses 
        select:[:cls | cls isLoaded and:[cls isPrivate not and:[cls isNameSpace not]]])
        select:[:cls | cls revisionTimestamp > (Timestamp now - 2 hours)]

o  setBinaryRevision: aString
set the revision-ID.
This should normally not be done in the running system, as the source-manager
will need this to validate sourcefiles being correct for a given binary
(and optionally: extracting the required sourcefile from the rcs source)

o  setPackageFromRevision
set my package from the info found in the revisionString if present.
This is used to set some useful packageInfo after autoloading
(otherwise, autoloaded classes/methods would go into your current
package - which is probably not a good idea)

Usage example(s):

     MemoryMonitor autoload.
     MemoryMonitor setPackageFromRevision

o  sourceFileSuffix
Answers a default suffix for source files, i.e.
'st' for Smalltalk, 'js' for JavaScript or 'rb' for Ruby', etc.

o  sourceStream
return an open stream on my sourcefile, nil if that is not available

o  sourceStreamFor: sourceFilename
return an open stream on a sourcefile, nil if that is not available

Usage example(s):

     Object sourceStream
     Clock sourceStream
     Autoload sourceStream
     self sourceStreamFor:'Class.st'
     Object sourceStreamFor:'Object.st'

o  updateVersionMethodFor: newRevisionString
helper for the checkin procedure.
Update my #version method, to now return newRevisionString.

o  validateSourceStream: aStream
check if aStream really contains my source.
This is done by checking the version method's return value
against the version string as contained in the version method.
This helps to detect mangled source code.

o  versionMethodTemplateForSourceCodeManager: aSourceCodeManager

traits
o  addTrait: aTrait

o  applyChangesOfNewTraitCompositionReplacing: oldComposition

o  hasTraitComposition
Array hasTraitComposition

o  importTraits: aTraitOrTraitsCollection

o  overloadedTraitMethods
Array overloadedTraitMethods

o  overloadedTraitMethods: aDictionary
Array overloadedTraitMethods

o  removeTrait: aTrait

o  setTraitComposition: newTraitComposition
self applyChangesOfNewTraitCompositionReplacing: oldComposition.

o  traitComposition
Array traitComposition

o  traitComposition: aTraitComposition


Private classes:

    ArrayWithSequenceNumberValidation
    ClassAttributes
    SimulatedClassPool


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:29:24 GMT