eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Class':

Home

everywhere
www.exept.de
for:
[back]

Class: Class


Inheritance:

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

Package:
stx:libbasic
Category:
Kernel-Classes
Version:
rev: 1.573 date: 2010/04/30 09:56:51
user: stefan
file: Class.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Claus Gittinger

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


Related information:

    Behavior
    ClassDescription
    Metaclass

Class protocol:

accessing-flags
o  tryLocalSourceFirst
if true, 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, 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 subclassOf: aClass instanceVariableNames: stringOfInstVarNames category: categoryString
this new instance creation protocol will replace the traditional inst-creation messages

o  name: newName subclassOf: aClass instanceVariableNames: stringOfInstVarNames classVariableNames: stringOfClassVarNames category: categoryString
this new instance creation protocol will 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 will replace the traditional inst-creation messages

o  name: newName subclassOf: aClass instanceVariableNames: stringOfInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames category: categoryString
this new instance creation protocol will replace the traditional inst-creation messages

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

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 methods 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

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

o  subclassInfo
build & return a dictionary, containing the set of subclass
for each class. This information is kept until explicitely flushed
by #flushSubclassInfo.
This cache is used internally, for enumerators like #allSubclasses
or #allSubclassesDo:, to avoid repeated recursive walks over the class
hierarchy.
This is private protocol.

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

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

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

o  subclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s
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  fileOutSourceOn: aStream

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

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

o  addClassVarName: aString
add a class variable if not already there and initialize it 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.

o  category: aStringOrSymbol
set the category of the class to be the argument, aStringOrSymbol

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.

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

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

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: aSymbol 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.

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

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

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

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

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 private or anonymous classes, nil is returned -
for public classes, Smalltalk is returned.

o  package
return the package-ID-Symbol of the class.

o  package: aSymbol
set the package-ID.Symbol of the class.

o  primitiveDefinitions: aString
set the primitiveDefinition string

o  primitiveDefinitionsString
return the primitiveDefinition string or nil

o  primitiveDefinitionsStringOrDefault
return the primitiveDefinition string or a default

o  primitiveFunctions: aString
set the primitiveFunction string

o  primitiveFunctionsString
return the primitiveFunctions string or nil

o  primitiveFunctionsStringOrDefault
return the primitiveFunction string or a default

o  primitiveVariables: aString
set the primitiveVariable string

o  primitiveVariablesString
return the primitiveVariables string or nil

o  primitiveVariablesStringOrDefault
return the primitiveVariable string or a default

o  privateClassNamed: aClassNameStringOrSymbol

o  privateClasses
return a collection of my private classes (if any).
The classes are in any order.

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 any order.

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

o  projectDefinition

** 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

o  realSharedPools
this returns the namespace aware pool names

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

o  setClassFilename: aFilename
set the classes filename.
This is a dangerous (low level) operation,
since the comment and primitiveSpecs may no longer be accessable,
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.

o  sharedPools
this returns the plain (non-namespace aware) pool names

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

o  source
return the classes full source code

o  sourceCodeManager
return my source code manager.
For now, all classes return the same global manager.
But future versions may support mixed reporitories

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

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)

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 ...)

binary storage
o  addGlobalsForBinaryStorageTo: globalDictionary
classPool == nil ifFalse: [
classPool associationsDo: [:assoc|
globalDictionary at: assoc put: self
]
]

o  binaryClassDefinitionFrom: stream manager: manager
retrieve a class as stored previously with
#storeBinaryClassOn:manager:
The namespace, where the class is to be installed is queries via the
NameSpaceQuerySignal - it should answer with nil, to suppress installation.

o  storeBinaryClassOn: stream manager: manager
store a classes complete description (i.e. including methods).
However, the superclass chain is not stored - at load time, that must
be either present or autoloadable.

o  storeBinaryDefinitionOf: anAssociation on: stream manager: manager
not usable at the moment - there are no classpools currently

o  storeBinaryDefinitionOn: stream manager: manager
store the receiver in a binary format on stream.
This is an internal interface for binary storage mechanism.
classes only store the name, signature and instvar names.
They restore by looking for that name in the Smalltalk dictionary.
However, using the signature, a check for being valid is made at
restore time.
This avoids a full recursive store of a class in the normal binary
storage - however, it also means that a classes semantics cannot
be stored with the basic storeBinary operation
(we depend on the class being present at binaryLoad time.
To store classes, use #storeBinaryClassOn:manager: or BOSS>>nextPutClasses:.

changes management
o  addChangeRecordForChangeCategory
add a category change

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

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  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.

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 ?).

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 ?).

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  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 source is 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  binaryFileOutOn: aStream sourceMode: sourceMode
append a binary representation of myself to aStream 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 - dont save sources.

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

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 - dont 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 - dont 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)

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.

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

printOut
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.

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  flushSubclasses

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

o  getSourceChunkAttribute: aKey

o  setAttribute: key to: aValue

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  setSharedPools: aStringOrCollection
set the sharedPools string (no change notifications)

o  setSubclasses: aCollection

o  setSuperclass: aClass
set the superclass of the receiver.
this method is for special uses only - there will be no recompilation
and no change record written here. Also, if the receiver class has
already been in use, future operation of the system is not guaranteed to
be correct, since no caches are flushed.
Therefore: do NOT use it; use #superclass: (or flush the caches, at least).

o  updateAllCachedSubclasses

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 dont allow this

o  classResources

o  extensions
return a collection of extension-methods from any package, or empty if there are none.

o  extensionsFrom: aPackageID
return the set of extension-methods from the given package.

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)

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)

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

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.

o  isJavaScriptClass

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

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

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.

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

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. This method should not be used for
repeated searches (i.e. in the compiler/parser), since it creates
many throw away intermediate objects.

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).

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

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

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

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)

source management
o  binaryRevision
return the revision-ID from which the class was stc-compiled;
nil if its 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.

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)

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

o  nameOfVersionMethod

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 parenthesis.
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.

o  projectDirectory
return my projects directory - thats where the sources, binaries, classLib,
resources etc. are typically found.

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.

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
cvs-id of the source to which this class is equivalent.
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  revisionDateString
return the revision-Date of the class as a string.
This is extracted from the version string.

o  revisionInfo
return an object filled with revision info.
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  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 accessable,
or no such method exists, then nil is returned.

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)

o  sourceFileSuffix

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

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

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


Private classes:

    ClassAttributes
    SimulatedClassPool


ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 08:35:51 GMT