|
Class: ClassDescription
Object
|
+--Behavior
|
+--ClassDescription
|
+--Class
|
+--InlineObject::InlineObjectClassDescription
|
+--Metaclass
- Package:
- stx:libbasic
- Category:
- Kernel-Classes
- Version:
- rev:
1.336
date: 2024/02/17 11:41:45
- user: cg
- file: ClassDescription.st directory: libbasic
- module: stx stc-classLibrary: libbasic
ClassDescription conceptually adds some descriptive information to the basic
Behavior class. It is an abstract class used as a common superclass
for Metaclass and Class.
Subclasses must define the #name, #category and #comment methods.
[Instance variables:]
instvars <String> the names of the instance variables
| <Collection of words>
[Class variables:]
UpdatingChanges <Boolean> true if the changes-file shall be updated
(except during startup and when filing in, this flag
is usually true)
Please do no longer use this - see the two queries
below.
UpdateChangeFileQuerySignal used as an upQuery from the change management.
Whenever a changeRecord is to be written,
this signal is raised and a handler (if present)
is supposed to return true or false.
If unhandled, the value of the global
UpdatingChanges is returned for backward
compatibility (which means that the old
mechanism is used if no query-handler
is present).
UpdateChangeListQuerySignal used as an upQuery from the change management.
Whenever a change is to be added to the changeSet,
this signal is raised and a handler (if present)
is supposed to return true or false.
If unhandled, the value of the global
UpdatingChanges is returned for backward
compatibility (which means that the old
mechanism is used if no query-handler
is present).
LockChangesFile <Boolean> if true, the change file is locked for updates.
Required when multiple users operate on a common
change file.
This is an experimental new feature, being evaluated.
FileOutErrorSignal raised when an error occurs during fileOut
CatchMethodRedefinitions if true, classes protect themself
MethodRedefinitionSignal (by raising MethodRedefinitionSignal)
from redefining any existing methods,
which are defined in another package.
(i.e. a signal will be raised, if you
fileIn something which redefines an
existing method and the packages do not
match).
The default is (currently) true.
TryLocalSourceFirst If true, local source files are tried
first BEFORE the sourceCodeManager is
consulted. If false, the sourceCodeManager
is asked first.
Should be turned on, if you run an image from
local sources which have not yet been checked in.
NameSpaceQuerySignal used as an upQuery to ask for a namespace into
which new classes are to be installed.
PackageQuerySignal used as an upQuery to ask for a packageSymbol with
which new classes/methods are to be marked.
CreateNameSpaceQuerySignal used as an upQuery to ask if unknown namespaces
should be silently created (without asking the user)
MethodHistory if nonNil, this must be an OrderedCollection,
which is filled with method->previousversionMethod
associations. Can be used for undo-last-method-change
The number of remembered methods is controlled via the
UserPreferences.
Notice: this may fillup your memory over time,
the preferences are set too high.
MethodHistorySize the size of the methodHistory
(nil: unlimited)
copyrightCOPYRIGHT (c) 1993 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.
Signal constants
-
changeDefaultApplicationNotificationSignal
-
return the signal used as an up-Info to change the current application to which
new classes/methods will be added.
Will is only used when filing in V'Age code
Usage example(s):
Transcript showCR:Class changeDefaultApplicationNotificationSignal raise
|
-
classCategoryQuerySignal
-
return the signal used as an upQuery for the current class category name.
Will be used when defining a class without a proper classCategory information
(JS or Ruby classes). The browser will answer with the currently selected category then.
Usage example(s):
Transcript showCR:Class classCategoryQuerySignal raise
|
-
classConventionViolationConfirmationQuerySignal
-
return the query signal raised when a class is about to be installed
(or changed) which violates conventions (such as upper case instVars).
This is raised in subclass creation and can be handled to suppress
dialog boxes popping up during fileIn
-
classRedefinitionNotification
-
return the signal raised when a class is about to be redefined
differently from an existing class and the packages are not
equal. This helps when filing in alien code, to prevent existing
classes from being redefined by incompatible classes
(classVars, classInstVars or inheritance).
-
classRedefinitionSignal
-
use #classRedefinitionNotification
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
createNameSpaceQuerySignal
-
return the signal used as an upQuery if a new nameSpace should be
silently created without user confirmation.
Only used when installing autoloaded classes
-
defaultApplicationQuerySignal
-
return the signal used as an upQuery for the current application to which
new classes/methods are to be added.
Will is only used when filing in V'Age code
Usage example(s):
Transcript showCR:Class defaultApplicationQuerySignal raise
|
-
fileOutErrorSignal
-
return the signal raised when an error occurs while fileing out.
This is signalled to allow browsers some user feed back in case
a fileout fails (for example due to disk-full errors)
-
fileOutNameSpaceQuerySignal
-
return the signal used as an upQuery whether the current
namespace should be prepended (as pragma) on fileOut.
Usage example(s):
Transcript showCR:Class fileOutNameSpaceQuerySignal raise
|
-
forceNoNameSpaceQuerySignal
-
-
methodRedefinitionNotification
-
return the signal raised when a method is about to be installed
which redefines an existing method and the method's packages are not
equal. This helps when filing in alien code, to prevent existing
methods to be overwritten or redefined by incompatible methods
-
methodRedefinitionSignal
-
use #methodRedefinitionNotification
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
nameSpaceQuerySignal
-
return the signal used as an upQuery for the current nameSpace.
Will be used when filing in code.
This could be used BEFORE initialize has been invoked - that's why we do not
simply return the class var here.
Usage example(s):
Transcript showCR:Class nameSpaceQuerySignal raise
|
-
packageQuerySignal
-
return the signal used as an upQuery for the current packages name.
Will be used when filing in code
Usage example(s):
Transcript showCR:Class packageQuerySignal raise
|
-
packageRedefinitionNotification
-
return the signal raised when a class or method is about to be installed
which redefines an existing method and the method's packages are not
equal. This helps when filing in alien code, to prevent existing
methods to be overwritten or redefined by incompatible methods
-
updateChangeFileQuerySignal
-
return the signal used as an upQuery if the changeFile should be updated.
If unhandled, the value of UpdatingChanges is returned by the signals
static handler.
Usage example(s):
Transcript showCR:Class updateChangeFileQuerySignal raise
|
-
updateChangeListQuerySignal
-
return the signal used as an upQuery if the changeList should be updated.
If unhandled, the value of UpdatingChanges is returned by the signals
static handler.
Usage example(s):
Transcript showCR:Class updateChangeListQuerySignal raise
|
-
updateHistoryLineQuerySignal
-
return the signal used as an upQuery if the historyline of a method should be updated.
If unhandled, the history managers setting is returned by the signals
static handler.
Usage example(s):
Class updateHistoryLineQuerySignal raise
|
-
usedNameSpaceQuerySignal
-
return the signal used as an upQuery for the used nameSpace.
Will be used when filing in code.
This could be used BEFORE initialize has been invoked - that's why we do not
simply return the class var here.
accessing-flags
-
catchClassRedefinitions
-
return the class-redefinition catching flag.
-
catchClassRedefinitions: aBoolean
-
turn on/off class redefinition catching.
If on, redefining classes from another package will show a
warning dialog. Useful, when filing in alien code to avoid defefinition
of system methods.
Return the prior value of the flag.
-
catchMethodRedefinitions
-
return the method-redefinition catching flag.
-
catchMethodRedefinitions: aBoolean
-
turn on/off method redefinition catching.
If on, redefining methods from another package will show a
warning dialog. Useful, when filing in alien code to avoid defefinition
of system methods.
Return the prior value of the flag.
-
keepMethodHistory: aBoolean
-
turn on/off oldMethod remembering. If on, a methods previous version
is kept locally, for later undo (or compare).
Usage example(s):
Class keepMethodHistory:true
Class keepMethodHistory:false
|
-
lockChangesFile
-
return true, if the change file is locked during update
-
lockChangesFile: aBoolean
-
turn on/off change-file-locking. Return the previous value of the flag.
accessing-history
-
flushMethodHistory
-
flush any method->previousVersion associations,
all method history is lost.
-
methodHistory
-
return a dictionary containing method->previousVersion associations,
nil if method remembering has been turned off
Usage example(s):
enumeration
-
allClassesInCategory: aCategory do: aBlock
-
evaluate aBlock for all classes in aCategory;
no specific order is defined.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
allClassesInCategory: aCategory inOrderDo: aBlock
-
evaluate aBlock for all classes in aCategory;
superclasses come first - then subclasses.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
initialization
-
initialize
-
the classvariable 'UpdatingChanges' controls if changes are put
into the changes-file; normally this variable is set to true, but
(for example) during fileIn or when changes are applied, it is set to false
to avoid putting too much junk into the changes-file.
Usage example(s):
This could be used BEFORE initialize has been invoked - that's why we initialize
the class var there.
|
Usage example(s):
This could be used BEFORE initialize has been invoked - that's why we initialize
the class var there.
|
Usage example(s):
ClassDescription initialize
|
queries
-
isBuiltInClass
-
return true if this class is known by the run-time-system.
Here, true is returned for myself, false for subclasses.
Compatibility-Dolphin
-
categoriesFor: aMethodSelector
( an extension from the stx:libcompat package )
-
this method allows fileIn of Dolphin methods -
return a MethodCategoriesReader to read in a methods categories for me.
Since Dolphin uses a different way to assign method categories,
loaded methods are temporarily categorized as 'Dolphin methods'
and later reassigned, when a categoriesFor: message arrives.
-
categoriesForClass
( an extension from the stx:libcompat package )
-
this method allows fileIn of Dolphin classes -
return a ClassCategoriesReader to read in a classes categories for me.
Since Dolphin uses a different way to assign class categories,
the loaded classes are temporarily categorized as 'ST/V classes'
and later reassigned, when a categoriesForClass message arrives.
-
methodsFor
-
this method allows fileIn of Dolphin methods -
return a ClassCategoryReader to read in and compile methods for me.
Since Dolphin uses a different way to assign method categories,
the loaded methods are temporarily categorized as 'Dolphin methods'
and later reassigned, when a categoriesFor: message arrives.
-
sourceManager
-
Answer the receiver's source manager.
Compatibility-ST/V
-
variableByteSubclass: nameSymbol classVariableNames: classVarString poolDictionaries: pool category: cat
( an extension from the stx:libcompat package )
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable byte-sized nonpointer variables (but no instance variables)
Compatibility-ST80
-
addInstVarName: anotherInstVar
-
-
addInstVarName: anotherInstVar afterIndex: indexOrNil
-
Jan Vrany: I replaced original Claus code.
See comment at the end of this method
-
organization
-
for ST80 compatibility;
read the documentation in ClassOrganizer for more info.
-
preSave: aParcel
-
Allow additional process of a Parcel before writing. This method works
with the matching method postLoad:, to handle additional processing
after loading a Parcel. The typical operation to do here is to save
named objects to aParcel (and retrieve them in postLoad:).
-
removeInstVarName: anInstVar
-
-
reorganize
-
for ST80 compatibility;
nothing done here.
-
reorganizeFromString: orgString
-
for ST80 compatibility but without functionality
Compatibility-Squeak
-
compile: code classified: cat withStamp: stamp
( an extension from the stx:libcompat package )
-
-
compile: code classified: cat withStamp: stamp notifying: requestor logSource: doLog
( an extension from the stx:libcompat package )
-
Make it working even if Monticello is not loaded
-
compileSilently: source classified: category
( an extension from the stx:libcompat package )
-
-
protocols
-
-
subclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarNameString package: packageName
-
create a new class as a subclass of an existing class (the receiver).
The subclass will have indexed variables if the receiving-class has.
Squeak uses the category as package
-
variableSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarNameString package: packageName
-
create a new class as a subclass of an existing class (the receiver).
The subclass will have indexed variables if the receiving-class has.
Squeak uses the category as package
Compatibility-V'Age
-
categoriesFor: aSelector are: listOfCategories
-
to allow fileIn of V'Age code.
Set the category of the method which is installed under aSelector.
Since ST/X only supports a single category, take the first one
found in the listOfCategories.
-
commentFor: aSelector is: aString
-
to allow fileIn of V'Age code.
Set the comment of the method which is installed under aSelector.
For now, this is ignored
-
description: aString in: anApplication
-
to allow fileIn of V'Age code.
Set the description of the class.
-
descriptionFor: aSelector is: aString
-
to allow fileIn of V'Age code.
Set the description of the method which is installed under aSelector.
-
initializeAfterLoad
-
this message is sent after fileIn of a V'Age class
Compatibility-VW
-
compile: aString classified: protocol attributes: attributes
-
compile some method-code
-
shortName
-
accessing
-
definition
-
return an expression-string to define myself
Usage example(s):
Object definition
Point definition
Array definition
ByteArray definition
FloatArray definition
OpenGLConstantImporter definition
|
-
definitionWithoutPackage
-
return an expression-string to define myself (but not the package)
-
instVarAtOffset: index
-
return the name of the instance variable at index
-
instVarNames
-
return a collection of my instance variable name-strings
(excluding inherited instVar names).
Ask for allInstVarNames, to get all of them.
Traditionally, this was called instVarNames, but newer versions of squeak
seem to have changed to use instanceVariableNames.
So you probably should use the alias
Usage example(s):
Point instVarNames
SortedCollection instVarNames
SortedCollection allInstVarNames
|
-
instanceVariableOffsets
-
returns a dictionary containing the instance variable index
for each instVar name
Usage example(s):
Point instanceVariableOffsets
GraphicsContext instanceVariableOffsets
|
-
instanceVariableString
-
return a string of the instance variable names
Usage example(s):
Point instanceVariableString
|
-
nameSpace
-
should be redefined in concrete subclass(es)
-
projectDefinitionClass
-
return the project definition of the classes' package.
Here, nil is returned. Only full classes have one.
-
renameCategory: oldCategory to: newCategory
-
rename a category (changes category of those methods).
Appends a change record and notifies dependents.
-
sharedPoolNamed: aPoolName
-
this returns a resolved real pool (i.e. a PoolDictionary),
This cares for the namespace in which the class is located
Notice, that for source compatibility with other smalltalks,
the pool's namespace in a class definition is not in the pool name,
as to make it is easy to fileIn an alien class into an ST/X namespace,
and also to allow filing out smalltalk-namespace classes for import into
another smalltalk.
However, then we must resolve the actual pool later - i.e. here
-
sharedPoolNames
-
this returns a collection of the plain (non-namespace aware) pool names
-
sharedPools
-
this returns a collection of the real pools (i.e. the PoolDictionaries),
not their names (see sharedPoolNames).
This cares for the namespace in which the class is located
Notice, that for source compatibility with other smalltalks,
the namespace is not in the pool name, as to make it is easy to fileIn an alien class
into an ST/X namespace.
However, then we must resolve the actual pool later - i.e. here
Usage example(s):
an example for a pool inside a namespace (in this case: a private pool):
UnixOperatingSystem::ELFFileHeader sharedPools
Smalltalk allClasses
collect:[:cls | cls -> cls sharedPools]
thenSelect:[:assoc | assoc value notEmptyOrNil].
OSI::ASN1_Coder sharedPoolNames
ZipArchive sharedPools
Croquet::OpenGL sharedPools
OpenGLRenderingContext sharedPools
Character sharedPools
Win32OperatingSystem sharedPools
|
-
typeOfClassVarNamed: classVarName
-
option to return a collection of types which are considered
legal for classVarName.
This is pure documentation, and has (currently) no semantic implications.
If present, it is used by the code completer's type inferer,
to make better guesses.
Subclasses may redefine it to return a class, interface or a set of classes.
-
typeOfInstVarNamed: instVarName
-
option to return a collection of types which are considered
legal for instVarName.
This is pure documentation, and has (currently) no semantic implications.
If present, it is used by the code completer's type inferer,
to make better guesses.
Subclasses may redefine it to return a class, interface or a set of classes.
Usage example(s):
Class typeOfInstVarNamed:'instSize' -> SmallInteger
|
adding & removing
-
addSelector: newSelector withMethod: newMethod
-
add the method given by 2nd argument under the selector given by
1st argument to the methodDictionary.
Append a change record to the changes file and tell dependents.
-
basicAddSelector: newSelector withMethod: newMethod
-
add the method given by 2nd argument under the selector given by
1st argument to the methodDictionary.
This does NOT append a change record to the changes file and tell
dependents. Also, no methodHistory is kept or redefinition is checked.
-
removeSelector: aSelector
-
remove the selector, aSelector and its associated method
from the methodDictionary.
Append a change record to the changes file and tell dependents.
c function interfacing
-
cInterfaceFunction: selector calling: cFunctionNameString args: argTypeArray returning: returnType
-
create an interface to an existing (i.e. already linked in) c function.
The function can be called by sending selector to the receiver class.
The c-function has the name cFunctionNameString, and expects parameters as specified in
argTypeArray. The functions return value has a type as specified by returnType.
WARNING:
this interface is EXPERIMENTAL - it may change or even be removed.
Usage example(s):
Object subclass:#CInterface
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'Examples'.
CInterface cInterfaceFunction:#printfOn:format:withFloat:
calling:'fprintf'
args:#(ExternalStream String Float)
returning:#SmallInteger.
CInterface printfOn:Stdout format:'this is a float: %g' withFloat:(Float pi). Stdout cr
|
changes management
-
addChangeRecordForMethod: aMethod
-
add a method-change-record to the changes file and to the current changeSet
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
addChangeRecordForMethod: aMethod fromOld: oldMethod
-
add a method-change-record to the changes file and to the current changeSet
-
addChangeRecordForMethodCategory: aMethodOrSelector category: aString
-
add a methodCategory-change-record to the changes file and to the current changeSet
-
addChangeRecordForMethodPackage: aMethodOrSelector package: aPackageSymbol
-
add a methodPackage-change-record to the changes file and to the current changeSet
-
addChangeRecordForMethodPrivacy: aMethod
-
add a method-privacy-change-record to the changes file and to the current changeSet
-
addChangeRecordForRemoveSelector: aSelector fromOld: oldMethod
-
add a method-remove-record to the changes file and to the current changeSet
-
addChangeRecordForRenameCategory: oldCategory to: newCategory
-
add a category-rename record to the changes file and to the current changeSet
-
addChangeTimeStampTo: aStream
-
a timestamp - prepended to any change, except infoRecords
-
addInfoRecord: aMessage
-
add an info-record (snapshot, class fileOut etc.) to the changes file
-
changesStream
-
return a Stream for the writing changes file.
This returns a regular stream or a locked stream - according to
the LockChangesFile settings
(recommended if multiple images operate on a common changes file)
-
withoutUpdatingChangeSetDo: aBlock
-
turn off changeSet update while evaluating aBlock.
Returns the block's evaluated value.
-
withoutUpdatingChangesDo: aBlock
-
turn off change file update while evaluating aBlock.
Returns the block's evaluated value.
compiling
-
compile: code classified: category
-
compile code, aString for this class;
if successful update the method dictionary.
The method is classified under category.
Returns the new method or nil (on failure).
-
compile: code classified: category logged: logged
-
compile code, aString for this class;
if successful update the method dictionary.
The method is classified under category.
If logged is true, a changeRecord is written.
Returns the new method or nil (on failure).
-
compile: code classified: cat notifying: requestor
-
compile code, aString for this class; on any error, notify
requestor, anObject with the error reason.
Install the method under the category, cat.
Returns the new method or nil (on failure).
-
compile: code notifying: requestor ifFail: failBlock
-
compile code, aString for this class; on any error, notify
requestor, anObject with the error reason.
Returns the new method or nil (on failure).
-
compileSilently: code classified: category notifying: requestor
-
Compile the code and classify the resulting method in the given category,
leaving no trail in the system log, nor in any change set,
nor in the 'recent submissions' list.
This should only be used when you know for sure that the compilation will succeed.
-
recompile
-
recompile all methods
used when a class changes instances and therefore all methods
have to be recompiled
Usage example(s):
recompile all methods
used when a class changes instances and therefore all methods
have to be recompiled
|
-
recompile: aSelector
-
recompile the method associated with the argument, aSelector;
used when a superclass changes instances and we have to recompile subclasses.
Returns the new method or nil (on failure).
-
recompile: aSelector usingCompiler: aCompiler
-
recompile the method associated with the argument, aSelector;
used when a superclass changes instances and we have to recompile subclasses.
Returns the new method or nil (on failure).
-
recompile: aSelector usingCompilerClass: aCompilerClass
-
recompile the method associated with the argument, aSelector;
used when a superclass changes instances and we have to recompile subclasses.
Returns the new method or nil (on failure).
-
recompileAll
-
recompile this class and all subclasses
-
recompileForSpeed: aSelector
-
recompile the method associated with the argument, aSelector;
for highest speed (i.e. using the stc compiler, if supported by the architecture).
-
recompileInvalidatedMethods
-
recompile all invalidated methods
-
recompileMethodsAccessingAny: setOfNames
-
recompile all methods accessing a variable from setOfNames
-
recompileMethodsAccessingAny: setOfNames orSuper: superBoolean
-
recompile all methods accessing a variable from setOfNames,
or super (if superBoolean is true).
Also recompiles methods with possibly inlined instVarIndexFor:
-
recompileMethodsAccessingAnyClassvarOrGlobal: aCollection
-
recompile all methods accessing a global or classvar in aCollection
-
recompileMethodsAccessingGlobal: aGlobalKey
-
recompile all methods accessing the global variable aGlobalKey
-
recompileMethodsWithMachineCode
-
recompile all methods which have non-dynamic machineCode
(i.e. those, which were loaded from a compiled classLibrary)
-
recompileUsingCompilerClass: aCompilerClass
-
recompile all methods
used when a class changes instances and therefore all methods
have to be recompiled
fileIn interface
-
commentStamp: aStamp prior: whatever
( an extension from the stx:libcompat package )
-
return a ClassCategoryReader to read in and compile methods for me.
This was added to allow squeak code to be filedIn.
-
ignoredMethodsFor: aCategory
-
this is a speciality of ST/X - it allows quick commenting of methods
from a source-file by replacing the 'methodsFor:' by 'ignoredMethodsFor:'.
Returns a ClassCategoryReader to read in and skip methods.
-
methods
-
this method allows fileIn of ST/V methods -
return a ClassCategoryReader to read in and compile methods for me.
Since ST/V does not support method categories, the loaded methods are
categorized as 'ST/V methods'.
-
methodsFor: aCategory
-
return a ClassCategoryReader to read in and compile methods for me.
-
methodsFor: aCategory stamp: time
-
return a ClassCategoryReader to read in and compile methods for me.
This was added to allow squeak code to be filedIn.
-
methodsForUndefined: categoryString
-
ST-80 compatibility.
I don't yet know what this does - it was encountered by some tester.
For now, simply forward it.
-
privateMethods
-
this method allows fileIn of V'Age methods
The privateMethods keyword is for documentation only;
by default, methods are public (for backward compatibility)
(although, they could be made private here).
-
privateMethodsFor: aCategory
-
this method allows fileIn of ENVY and ST/X private methods.
The following methods are only allowed to be executed if sent from a method
within the current class. Subclass sends or out-of-class sends will raise
a privatMethodError exception.
-
protectedMethodsFor: aCategory
-
this method allows fileIn of ENVY and ST/X protected methods.
The following methods are only allowed to be executed if sent from a method
within the current class or a subclass. Out-of-class sends will raise
a privatMethodError exception.
-
publicMethods
-
this method allows fileIn of V'Age methods
The publicMethods keyword is for documentation only;
by default, methods are public anyway (for backward compatibility).
-
publicMethodsFor: aCategory
-
this method allows fileIn of ENVY methods
The publicMethods keyword is for documentation only; my default, methods
are public anyway (for backward compatibility).
fileOut
-
fileOutCategory: aCategory
-
create a file 'class-category.st' consisting of all methods in aCategory.
If the current project is not nil, create the file in the projects
directory.
-
fileOutCategory: aCategory except: skippedMethods only: savedMethods methodFilter: methodFilter on: aStream
-
file out all methods belonging to aCategory, aString onto aStream.
If skippedMethods is nonNil, those are not saved.
If savedMethods is nonNil, only those are saved.
If both are nil, all are saved. See version-method handling in
fileOut for what this is needed.
-
fileOutCategory: aCategory except: skippedMethods only: savedMethods on: aStream
-
file out all methods belonging to aCategory, aString onto aStream.
If skippedMethods is nonNil, those are not saved.
If savedMethods is nonNil, only those are saved.
If both are nil, all are saved. See version-method handling in
fileOut for what this is needed.
-
fileOutCategory: aCategory methodFilter: methodFilter on: aStream
-
file out all methods belonging to aCategory, aString onto aStream
-
fileOutCategory: aCategory on: aStream
-
file out all methods belonging to aCategory, aString onto aStream
-
fileOutMethod: aMethod
-
create a file 'class-method.st' consisting of the method, aMethod.
If the current project is not nil, create the file in the projects
directory.
-
fileOutMethod: aMethod on: aStream
-
file out aMethod onto aStream. Used for example to write individual changeChunks
-
fileOutMethods: methods on: aStream
-
WARNING: will be obsoleted by SmalltalkChunkFileSourceWriter
fileOut-xml
-
fileOutXMLCategory: aCategory methodFilter: methodFilter on: aStream
-
file out all methods belonging to aCategory, aString in xml format onto aStream.
-
fileOutXMLMethod: aMethod on: aStream
-
file out a method in xml format onto aStream.
initialization
-
initializeWithAllPrivateClasses
-
if implemented, send #initialize to myself and any private
class which does so.
This is sent to a class after it
has been loaded into the system.
Statically compiled classes are initialized by the VM
misc ui support
-
iconInBrowserForVariableNamed: varName
( an extension from the stx:libtool package )
-
variables for which an entry is found in the xml-spec (if any) are marked
with an <xml>-icon.
For now, this is expecco-specific, but should be somehow lifted to the base system
printing & storing
-
displayOn: aGCOrStream
-
return a string for display in inspectors
-
nameWithNameSpacePrefix
-
return my name's printString,
with nameSpace prefix (even if it's the Smalltalk namespace)
Usage example(s):
a public class:
Array name
Array nameWithoutPrefix
Array nameWithoutNameSpacePrefix
Array nameWithNameSpacePrefix
|
Usage example(s):
a private class:
Method::MethodWhoInfo name
Method::MethodWhoInfo nameWithoutPrefix
Method::MethodWhoInfo nameWithoutNameSpacePrefix
Method::MethodWhoInfo nameWithNameSpacePrefix
|
Usage example(s):
a namespace class:
CodingExamples::TopClass name
CodingExamples::TopClass nameWithoutPrefix
CodingExamples::TopClass nameWithoutNameSpacePrefix
CodingExamples::TopClass nameWithNameSpacePrefix
|
Usage example(s):
a private class in a namespace class:
CodingExamples::TopClass::SubClass name
CodingExamples::TopClass::SubClass nameWithoutPrefix
CodingExamples::TopClass::SubClass nameWithoutNameSpacePrefix
CodingExamples::TopClass::SubClass nameWithNameSpacePrefix
|
-
nameWithoutNameSpacePrefix
-
helper for fileOut and others - return my names printString,
without any nameSpace prefix (but with owningClasses prefix)
Usage example(s):
a public class:
Array name
Array nameWithoutPrefix
Array nameWithoutNameSpacePrefix
|
Usage example(s):
a private class:
Method::MethodWhoInfo name
Method::MethodWhoInfo nameWithoutPrefix
Method::MethodWhoInfo nameWithoutNameSpacePrefix
|
Usage example(s):
a namespace class:
CodingExamples::TopClass name
CodingExamples::TopClass nameWithoutPrefix
CodingExamples::TopClass nameWithoutNameSpacePrefix
|
Usage example(s):
a private class in a namespace class:
CodingExamples::TopClass::SubClass name
CodingExamples::TopClass::SubClass nameWithoutPrefix
CodingExamples::TopClass::SubClass nameWithoutNameSpacePrefix
|
-
nameWithoutPrefix
-
helper for fileOut and others - return my name's printString,
without any owningClass or nameSpace prefix
Usage example(s):
a public class:
Array name => #Array
Array nameWithoutPrefix => #Array
Array nameWithoutNameSpacePrefix => #Array
|
Usage example(s):
a private class:
Method::MethodWhoInfo name => #'Method::MethodWhoInfo'
Method::MethodWhoInfo nameWithoutPrefix => 'MethodWhoInfo'
Method::MethodWhoInfo nameWithoutNameSpacePrefix => 'Method::MethodWhoInfo'
|
Usage example(s):
a namespace class:
Demos::WalkingGirl name
Demos::WalkingGirl nameWithoutPrefix
Demos::WalkingGirl nameWithoutNameSpacePrefix
|
Usage example(s):
a private class in a namespace class:
Demos::WalkingGirl::AnimationView name
Demos::WalkingGirl::AnimationView nameWithoutPrefix
Demos::WalkingGirl::AnimationView nameWithoutNameSpacePrefix
|
-
printClassNameOn: aStream
-
helper for fileOut - print my name.
Private classes always print their owning-class as nameSpace
prefix; non-private ones print without, except if the
FileOutNameSpaceQuery returns true. The last feature is used
with changefile updates - here, the full name is wanted.
-
printHierarchyAnswerIndentOn: aStream
-
print my class hierarchy on aStream - return indent
recursively calls itself to print superclass and use returned indent
for my description - used in the browser
-
printHierarchyOn: aStream
-
print my class hierarchy on aStream
-
printInstVarNamesOn: aStream indent: indent
-
print the instance variable names indented and breaking at line end
-
printNameArray: anArray on: aStream indent: indent
-
print an array of strings separated by spaces; when the stream
defines a lineLength, break when this limit is reached; indent
every line; used to printOut instance variable names
-
printNameInHierarchy
-
return my name as printed in the hierarchy
-
printOutCategory: aCategory on: aPrintStream
-
print out all methods in aCategory on aPrintStream, which should understand emphasis
Usage example(s):
ClassDescription printOutCategory:'queries' on:Transcript
|
-
printOutSource: aString on: aPrintStream
-
print out a source-string; the message-specification is printed bold,
comments are printed italic
private-changes management
-
addChangeRecordForMethod: aMethod to: aStream
-
append a method-change-record to aStream
-
addChangeRecordForMethodCategory: aMethod category: newCategory to: aStream
-
append a methodCategory-change-record to aStream
-
addChangeRecordForMethodPackage: aMethod package: newPackageSymbol to: aStream
-
append a methodPackage-change-record to aStream
-
addChangeRecordForMethodPrivacy: aMethod to: aStream
-
append a method-privacy-change-record to aStream
-
addChangeRecordForRemoveSelector: aSelector to: aStream
-
append a method-remove-record to aStream
-
addChangeRecordForRenameCategory: oldCategory to: newCategory to: aStream
-
append a category-rename record to aStream
-
addInfoRecord: aMessage to: aStream
-
append an info-record (snapshot, class fileOut etc.) to aStream
-
writingChangeDo: aBlock
-
common helper to write a change record.
Opens the changefile and executes aBlock passing the stream
as argument. WriteErrors are caught and will lead to a warning.
The changefile is not kept open, to force the change to go to disk
as soon as possible - thus, in case of a crash, no changes should
be lost due to buffering.
-
writingChangePerform: aSelector with: anArgument
-
-
writingChangeWithTimeStamp: doStampIt do: aBlock
-
common helper to write a change record.
Opens the changefile and executes aBlock passing the stream
as argument. WriteErrors are caught and will lead to a warning.
The changefile is not kept open, to force the change to go to disk
as soon as possible - thus, in case of a crash, no changes should
be lost due to buffering.
Access to the change file is serialized via the accessLock;
this prevents the changefile to be corrupted when multiple users
accept in the browser in a multi-display (or timesliced) configuration
-
writingChangeWithTimeStamp: stampIt perform: aSelector with: anArgument
-
private-helpers
-
addAllCategoriesTo: aCollection
-
helper - add categories and all superclasses categories
to the argument, aCollection
-
addAllPrivateClassesTo: aCollection
-
add all of my private classes to aCollection
-
addCategoriesTo: aCollection
-
helper - add categories to the argument, aCollection.
aCollection should be a set.
protocol printOut
-
printOutCategoryProtocol: aCategory on: aPrintStream
-
ClassDescription printOutCategoryProtocol:'queries' on:Transcript
Usage example(s):
ClassDescription printOutCategoryProtocol:'queries' on:Transcript
|
-
printOutMethodProtocol: aMethod on: aPrintStream
-
given the source in aString, print the method's message specification
and any method comments - without source.
Used to generate documentation pages
Usage example(s):
Float printOutProtocolOn:Stdout
Float printOutMethodProtocol:(Float compiledMethodAt:#coerce:) on:Transcript
|
queries
-
allCategories
-
Return a collection of all method-categories known in class
and all superclasses. This does NOT include the metaclass categories.
The returned collection is not sorted by any order.
Usage example(s):
Point categories
Point allCategories
Point class categories
Point class allCategories
|
-
categories
-
Return a collection of the method-categories known in the receiver class.
This does NOT include the metaclasses categories or the superclass categories.
The returned collection is not sorted by any order.
Usage example(s):
Point categories
Point class categories
|
-
commentOrDocumentationString
-
return either the classes documentation-method's comment
or its plain comment or nil
Usage example(s):
Array commentOrDocumentationString
|
-
definesInstanceVariable: aString
-
-
directlyDefinesInstanceVariable: aString
-
-
isObsolete
-
return true, if the receiver is obsolete
(i.e. has been replaced by a different class or was removed,
but is still referenced by instances)
-
methodCategories
-
Return a collection of the method-categories known in the receiver class.
This does NOT include the metaclasses categories or the superclass categories.
The returned collection is not sorted by any order.
Usage example(s):
Point methodCategories
Point class methodCategories
|
-
methodsInCategory: aCategory
-
helper for fileOut:
return an unsorted collection of methods from a given category
Usage example(s):
ClassDescription methodsInCategory:'queries'
|
-
methodsInCategory: aCategory forWhich: methodFilter
-
helper for fileOut: return an unsorted collection of methods from a
given category, for which a filterblock evaluates to true
Usage example(s):
ClassDescription methodsInCategory:'queries' forWhich:[:m | m selector startsWith:'w']
|
-
privateClasses
-
-
sourceCodeForMethod: aMethod at: aSelector
-
-
topNameSpace
-
return the nameSpace of my topOwningClass (if private) or my own nameSpace.
-
whichCategoryIncludesSelector: aSelector
-
return the category under which the method for aSelector is
classified
-
whichClassDefinesInstVar: aVariableName
-
return the class which defines the instance 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.
Usage example(s):
StandardSystemView whichClassDefinesInstVar:'label'
StandardSystemView whichClassDefinesInstVar:'paint'
StandardSystemView whichClassDefinesInstVar:'foo'
|
-
whichPoolDefinesPoolVar: aVariableName
-
return the shared pool which defines the pool variable named aVariableName
or nil if that is no pool variable.
Usage example(s):
ZipArchiveConstants classVariableNames
ZipArchive sharedPools
ZipArchive whichPoolDefinesPoolVar:'ECREC_SIZE'
ZipArchive class sharedPools
|
-
whichSelectorsAccess: instVarName
-
return a collection of selectors for methods which access
an instance variable
Usage example(s):
Point whichSelectorsAccess:'x'
|
special accessing
-
setInstVarNames: aCollectionOfStrings
-
set the instance variable names from a collection of strings.
No recompilation or updates are done and no changeList records are written.
This is NOT for general use.
-
setInstVarNamesArray: anArrayOfSymbols
-
set the instance variable names from an Array of Symbols.
No recompilation or updates are done and no changeList records are written.
This is NOT for general use.
-
setInstanceVariableString: aString
-
set the classes instvarnames string.
No recompilation or updates are done and no changeList records are written.
This is NOT for general use.
subclass creation
-
subclass: nameSymbol
-
create a new class as a subclass of an existing class (the receiver).
The subclass will have indexed variables if the receiving-class has.
-
subclass: nameSymbol instanceVariableNames: instVarNameString
-
create a new class as a subclass of an existing class (the receiver).
The subclass will have indexed variables if the receiving-class has.
-
subclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString
-
create a new class as a subclass of an existing class (the receiver).
The subclass will have indexed variables if the receiving-class has.
-
subclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver).
The subclass will have indexed variables if the receiving-class has.
-
subclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat classInstanceVariableNames: classInstanceVariableNames
-
create a new class as a subclass of an existing class (the receiver).
The subclass will have indexed variables if the receiving-class has.
-
subclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat inEnvironment: aNameSpace
-
create a new class as a subclass of an existing class (the receiver).
The subclass will have indexed variables if the receiving-class has.
-
subclass: nameSymbol uses: aTraitOrTraitsCollection instanceVariableNames: instVarNameString classVariableNames: classVarString package: packageName
-
squeak style class definition with traits
-
variableByteSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable byte-sized nonpointer variables
-
variableDoubleSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable double-sized nonpointer variables
-
variableFloatSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable float-sized nonpointer variables
-
variableLongLongSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable unsigned long-long-sized nonpointer variables
-
variableLongSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable long-sized nonpointer variables
-
variableSignedLongLongSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable signed long-long-sized nonpointer variables
-
variableSignedLongSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable signed long-sized nonpointer variables
-
variableSignedWordSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable word-sized signed nonpointer variables
-
variableSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable pointer variables
-
variableSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat classInstanceVariableNames: classInstanceVariableNames
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable pointer variables
-
variableWordSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool category: cat
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable word-sized nonpointer variables
subclass creation-private classes
-
subclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: ownerClassArg
-
create a new class as a subclass of an existing class (the receiver).
The subclass will have indexed variables if the receiving-class has.
-
variableByteSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: ownerClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable byte-sized nonpointer variables
-
variableDoubleSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: aClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable double-sized nonpointer variables
-
variableFloatSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: aClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable float-sized nonpointer variables
-
variableLongLongSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: aClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable longlong-sized nonpointer variables
-
variableLongSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: aClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable long-sized nonpointer variables
-
variableSignedLongLongSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: aClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable signed longlong-sized nonpointer variables
-
variableSignedLongSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: aClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable signed long-sized nonpointer variables
-
variableSignedWordSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: aClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable word-sized signed nonpointer variables
-
variableSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: ownerClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable pointer variables
-
variableWordSubclass: nameSymbol instanceVariableNames: instVarNameString classVariableNames: classVarString poolDictionaries: pool privateIn: aClass
-
create a new class as a subclass of an existing class (the receiver)
in which the subclass has indexable word-sized nonpointer variables
ClassRedefinitionNotification
MethodRedefinitionNotification
PackageRedefinition
|