eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Behavior':

Home

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

Class: Behavior


Inheritance:

   Object
   |
   +--Behavior
      |
      +--ClassDescription
      |
      +--Structure

Package:
stx:libbasic
Category:
Kernel-Classes
Version:
rev: 1.449 date: 2019/08/09 11:03:49
user: cg
file: Behavior.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Claus Gittinger

Description:


Every class in the system inherits from Behavior (via Class, ClassDescription);
so here is where most of the class messages end up being implemented.
(to answer a FAQ: 'Point basicNew' will be done here :-)

Beginners should keep in mind, that all classes are instances (of subclasses)
of Behavior, therefore you will find the above mentioned 'basicNew:' method
under the 'instance'-methods of Behavior - NOT under the class methods
('Behavior new' will create and return a new class, while sending 'new' to
any instance of Behavior (i.e. any class) will return an instance of that class).


Behavior provides minimum support for all class-like objects, which define behavior
of other objects. Additional stuff (meta info) is found in ClassDescription and Class.
Behavior provides all mechanisms needed to create instances (on the class side),
and send messages to them.
However, Behavior does not provide the (symbolic) information needed to compile methods
for a class or to get useful information in inspectors or browsers.

For experts:

Since instances of Behavior provide all that is needed to interact with the VM's
message dispatch mechanism, these can be used as 'light weight' classes.
I.e. it is possible, to generate completely anonymous classes (and instances thereof)
on the fly - 'Behavior new new' is such a thingy.

The selectors and methods are organized in a MethodDictionary (which is not a true
dictionary, but an Array with alternating selector/method entries).
This avoids the need for knowledge about Dictionaries in the runtime library (VM)
(lookup and search in these is seldom anyway, so the added benefit from using a
 hashed dictionary is almost void).

[Instance variables:]

    superclass        <Class>            the classes superclass

    methodDictionary  <MethodDictionary> inst-selectors and methods

    instSize          <SmallInteger>     the number of instance variables

    flags             <SmallInteger>     special flag bits coded in a number
                                         not for application use

flag bits (see stc.h):

NOTICE: layout known by compiler and runtime system; be careful when changing


Related information:

    Class
    ClassDescription
    Metaclass
    Method
    MethodDictionary

Class protocol:

creating new classes
o  new
creates and return a new behavior (which is like a class,
but without the symbolic & name information).
Not for normal applications.
Sending the returned behavior the #new message gives you
an instance if it.

Notice: the returned class is given a superclass of Object;
this allows for its new instances to be inspected and the like.

usage example(s):

     Behavior new               <- a new behavior
     Behavior new new           <- an instance of it
     ClassDescription new       <- a new classDescription
     ClassDescription new new   <- an instance of it
     Class new                  <- a new class
     Class new new              <- an instance of it
     Metaclass new              <- a new metaclass
     Metaclass new new          <- an instance (i.e. a class) of it
     Metaclass new new new      <- an instance of this new class

flag bit constants
o  flagAlien
Return the flag code for Alien objects for Translucent Object implementation

o  flagBehavior
return the flag code which marks Behavior-like instances.
Inline C-code and the VM check this single bit in the flag value when
checking for behaviors.

o  flagBlock
return the flag code which marks Block-like instances.
The VM and compiled code check for this bit in the flag
value when checking for blocks to be evaluated from bytecode
or calling the block's code immediately.

o  flagBlockContext
return the flag code which marks BlockContext-like instances.
The VM checks this single bit in the flag value when
checking for blockContexts.

o  flagBytes
return the flag code for byte-valued indexed instances.
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for byte valued
variable instances.

usage example(s):

     Behavior flagBytes

o  flagContext
return the flag code which marks Context-like instances.
The VM checks this single bit in the flag value when
checking for contexts.

o  flagDoubles
return the flag code for double-valued indexed instances (i.e. 8-byte reals).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for double valued
variable instances.

usage example(s):

     Behavior flagDoubles

     (ByteArray flags bitAnd:(Behavior maskIndexType)) == (Behavior flagDoubles)
     (DoubleArray flags bitAnd:(Behavior maskIndexType)) == (Behavior flagDoubles)
     (Object flags bitAnd:(Behavior maskIndexType)) == (Behavior flagDoubles)

o  flagExternalBytes
return the flag code which marks ExternalBytes-like instances.
Inline C-code and the VM check this single bit in the flag value when
checking for an externalBytes-like objet.

o  flagFloat
return the flag code which marks Float-like instances.
Inline C-code and the VM check this single bit in the flag value when
checking for a float.

o  flagFloats
return the flag code for float-valued indexed instances (i.e. 4-byte reals).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for double valued
variable instances.

usage example(s):

     Behavior flagFloats

o  flagForSymbolic: aSymbol
return the flag code for indexed instances with aSymbolic type.
The argument may be one of
#float, #double,
#word, #signedWord,
#long, #signedLong
#longLong, #signedLongLong,
#byte
#weakObjects
For VW compatibility, also accept:
#objects, #bytes, #weak.

o  flagJavaArray
return the flag code which marks Java array-like instances.
The VM checks this single bit in the flag value when
checking for a java arrays.

o  flagJavaClass
return the flag code which marks JavaClass-like instances.
The VM checks this single bit in the flag value when
checking for a javaClass.

o  flagJavaMethod
return the flag code which marks JavaMethod-like instances.
Inline C-code and the VM check this single bit in the flag value when
checking for a method.

o  flagLongLongs
return the flag code for longlong-valued indexed instances (i.e. 8-byte).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for
unsigned long valued variable instances.

usage example(s):

     Behavior flagLongLongs

o  flagLongs
return the flag code for long-valued indexed instances (i.e. 4-byte).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for
unsigned long valued variable instances.

usage example(s):

     Behavior flagLongs

o  flagMetaMethod
return the flag code which marks MetaMethod-like instances.
Inline C-code and the VM check this single bit in the flag value when
about to evaluate a method.

o  flagMethod
return the flag code which marks Method-like instances.
Inline C-code and the VM check this single bit in the flag value when
checking for a method.

o  flagNonObjectInst
return the flag code which marks instances which have a
non-object instance variable (in slot 1).
(these are ignored by the garbage collector)

o  flagNotIndexed
return the flag code for non-indexed instances.
You have to mask the flag value with indexMask when comparing
it with flagNotIndexed.

o  flagPointers
return the flag code for pointer indexed instances (i.e. Array of object).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for
pointer variable instances.

usage example(s):

     Behavior flagPointers

o  flagRegular
return the flag code which marks regular instances.

o  flagSignedLongLongs
return the flag code for signed longlong-valued indexed instances (i.e. 8-byte).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for
signed long valued variable instances.

usage example(s):

     Behavior flagSignedLongLongs

o  flagSignedLongs
return the flag code for signed long-valued indexed instances (i.e. 4-byte).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for
signed long valued variable instances.

usage example(s):

     Behavior flagSignedLongs

o  flagSignedWords
return the flag code for signed word-valued indexed instances (i.e. 2-byte).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for
signed word valued variable instances.

usage example(s):

     Behavior flagSignedWords

o  flagSymbol
return the flag code which marks Symbol-like instances.
Inline C-code and the VM check this single bit in the flag value when
checking for symbols.

o  flagVarArgBlock
return the flag code which marks varArg Block-like instances
with respect to byteCode interpretation & code calling.

o  flagWeak
return the flag code for weak-object-pointer indexed instances.
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for
weak pointer variable instances.

usage example(s):

     Behavior flagWeak

o  flagWeakPointers
return the flag code for weak pointer indexed instances (i.e. WeakArray).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for weak pointers.

o  flagWords
return the flag code for word-valued indexed instances (i.e. 2-byte).
The VM masks the flag value with the indexMask (maskIndexType)
and compares it to this flag value, when checking for
unsigned word valued variable instances.

usage example(s):

     Behavior flagWords

o  maskIndexType
return a mask to extract all index-type bits

helpers
o  classesSortedByLoadOrder2: aCollectionOfClasses
return a copy of the given collection of classes, which is sorted
by inheritance and superclass-of-any-private class.
This is the optimal order for loading, and the required order for compilation.

This is an alternate algorithm showing cycles

usage example(s):

     Class classesSortedByLoadOrder:stx_libbasic compiled_classes_common
     Class classesSortedByLoadOrder2:stx_libbasic compiled_classes_common
     Class classesSortedByLoadOrder:stx_libjava compiled_classes_common
     Class classesSortedByLoadOrder2:stx_libjava compiled_classes_common

o  classesSortedByLoadOrder: someClasses
return a copy of the given collection of classes, which is sorted
by inheritance and superclass-of-any-private class.
This is the optimal order for loading, and the required order for compilation

usage example(s):

     Class classesSortedByLoadOrder:(Smalltalk allClassesInPackage:'stx:libbasic')
     Class classesSortedByLoadOrder:(Smalltalk allClassesInPackage:'stx:libbasic3')
     Class classesSortedByLoadOrder:(Smalltalk allClassesInPackage:'stx:libwidg')
     Class classesSortedByLoadOrder:(Smalltalk allClassesInPackage:'stx:libjava')

o  commonSuperclassOf: listOfClassesOrClassNames
given a list of classes, return the common superclass.
A helper for the browser, some dialogs and some refactorings

usage example(s):

     Class commonSuperclassOf:#(Array OrderedCollection Set)
     Class commonSuperclassOf:#(Character Number Point)

misc
o  autoload
for compatibility with autoloaded classes - dummy here

queries
o  definitionSelectorFirstParts
return a collection of partial class-definition selectors

o  definitionSelectors
return a collection class-definition selectors

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

o  supportsMethodCategories
return true, if my methods are categorized.
This is a hook for the browser to allow alien classes
to be handled (actually, this is not yet used).


Instance protocol:

Compatibility-Dolphin
o  allSubinstances
Compatibility method - do not use in new code.
Same as allSubInstances; added for Dolphin compatibility

o  fromString: aString
reconstruct an instance of myself from the ascii-store string.
These bytes are typically the result from storing into a string/stream.
Same as readFrom:, for Dolphin compatibility.

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

o  lookupMethod: selector
Compatibility method - do not use in new code.
Return the method for given selector aSelector or nil.
Only methods in the receiver - not in the superclass chain are returned.
For dolphin compatibility.
TODO: fixme if I am wrong, and dolphin does a full lookup here. If that is the case,
change to use lookupMethodFor:aSelector below.

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

Compatibility-Squeak
o  allSelectorsInProtocol: aProtocol
( an extension from the stx:libcompat package )
Return all selectors defined in this class that take this number of arguments.

usage example(s):

     SmallInteger allSelectorsInProtocol:#testing
     Behavior allSelectorsInProtocol:'Compatibility-Squeak'

o  classSide
alias for theMetaclass - return the metaclass

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

o  defaultNameStemForInstances
( an extension from the stx:libcompat package )
Answer a basis for names of default instances of the receiver

o  instanceSide
alias for theNonMetaclass - return the non-metaclass

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

o  kindOfSubclass
( an extension from the stx:libcompat package )
Answer a String that is the keyword that describes the receiver's kind
of subclass, either a regular subclass, a variableSubclass, a
variableByteSubclass, a variableWordSubclass, or a weakSubclass.

usage example(s):

     Array kindOfSubclass
     WeakArray kindOfSubclass

o  lookupSelector: aSelector
return the method for a selector - Squeak compatibility

o  selectorsWithArgs: numberOfArgs
Return all selectors defined in this class that take this number of arguments.

usage example(s):

     SmallInteger selectorsWithArgs:0  
     SmallInteger selectorsWithArgs:1  
     SmallInteger selectorsWithArgs:2  
     SmallInteger selectorsWithArgs:3  
     SmallInteger selectorsWithArgs:4

o  setTraitComposition: aTraitComposition
( an extension from the stx:libcompat package )
| oldComposition |
(self hasTraitComposition not and: [aTraitComposition isEmpty]) ifTrue: [^self].
aTraitComposition assertValidUser: self.

oldComposition := self traitComposition.
self traitComposition: aTraitComposition.
self applyChangesOfNewTraitCompositionReplacing: oldComposition.

oldComposition traits do: [:each | each removeUser: self].
aTraitComposition traits do: [:each | each addUser: self]

o  theMetaClass
alias for theMetaclass (Squeak) - return the class.
sigh; in ST/X, it is called theMetaclass; please use that.

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

o  theNonMetaClass
alias for theNonMetaclass (Squeak) - return the class.
sigh; in ST/X, it is called theNonMetaclass; please use that.

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

Compatibility-VW
o  >> aSelector
return the method stored under the given selector; nil if there is none

usage example(s):

     self compiledMethodAt:#compiledMethodAt:
     self >> #compiledMethodAt:

o  findSelector: aSelector
return an array filled with class and method, which would be executed if aSelector was sent to
an instance of the receiver.
I.e. the selector arrays of the receiver
and all of its superclasses are searched for aSelector.
Return nil if instances do not understand aSelector

usage example(s):

     Array findSelector:#at:

o  fixedFieldsMask
Mask on the format word to indicate the number of fixed fields in instances
of a behavior. If this is non-zero, the behavior must be pointer-type

o  format
Answer an Integer that encodes the kinds and numbers of
variables of instances of the receiver.

See instSize method for reference to the fixedFieldsMask bit mask of the format.
See isVariable method for reference to the indexableMask bit mask of the format.
See isBits method for reference to the pointersMask bit mask of the format.
All other bits of the format are unused and should be 0.

o  getMethodDictionary
ST 80 compatibility: return the receiver's method dictionary.

o  instanceBehavior
Answer the instance behavior of the receiver.
This is the receiver for non metaclasses.
Metaclass overrides this to answer a Metaclass's sole instance.
Same as #theNonMetaclass - for VW compatibility

Javascript support
o  js_new
( an extension from the stx:libjavascript package )
redefinable JS-new

o  js_new: argument
( an extension from the stx:libjavascript package )
redefinable JS-new:

RefactoringBrowser
o  parseTreeFor: aSelector
( an extension from the stx:goodies/refactoryBrowser/parser package )
parse a method given a selector - return a parseTree

usage example(s):

     Behavior parseTreeFor:#'parseTreeFor:'

o  realClass
for compatibility with RBAbstractClass

accessing
o  addSelector: newSelector withMethod: newMethod
add the method given by 2nd argument under the selector given by
1st argument to the methodDictionary. Flushes all caches.

o  basicAddSelector: newSelector withMethod: newMethod
add the method given by 2nd argument under the selector given by
1st argument to the methodDictionary. Flushes all caches.

o  basicRemoveSelector: aSelector
remove the selector, aSelector and its associated method
from the methodDictionary

o  containingNameSpace
return the namespace which contains me.
Defined here as a dummy; actually only real classes should ever be put into a namespace.

o  flags
return the receiver's flag bits.
see flagXXX methods on my class side for details

o  instSize
return the number of instance variables of the receiver.
This includes all superclass instance variables.

o  lookupObject
return the lookupObject (Jan's MetaObjectProtocol support) or nil.
If non-nil, no lookup is performed by the VM, instead the VM asks the lookupObject
to provide a method for message sends.

usage example(s):

to make sure that subclasses get a lookupObject, if they need it.

usage example(s):

lookupObject notNil ifTrue:[^ lookupObject].

o  lookupObject: anObject
check if it is valid; the reason is that the VM gets into bad trouble,

o  methodDictionary
return the receiver's method dictionary.

o  methodDictionary: dict
set the receiver's method dictionary and flush inline caches.

o  package
for protocol compatibility with class

o  removeSelector: aSelector
remove the selector, aSelector and its associated method
from the methodDictionary

o  selectors
return the receiver's selector array as an OrderedCollection.
Notice: this may not be compatible with ST-80.
(should we return a Set ?)

o  superclass
return the receiver's superclass

autoload check
o  autoload
force autoloading - do nothing here;
redefined in Autoload; see comment there

o  isLoaded
return true, if the class has been loaded;
redefined in Autoload; see comment there

o  wasAutoloaded
return true, if this class came into the system via an
autoload; false otherwise.
Returning false here. This allows different Behavior-like objects
(alien classes) to be handled by the browser as well.

cleanup
o  flushSubclasses
I don't keep my subclasses - but if anyone inherits from me,
it better knows how to ignore this

o  lowSpaceCleanup
ignored here - redefined in some classes to
cleanup in low-memory situations

compiler interface
o  browserClass
return the browser to use for this class -
this can be redefined in special classes, to get different browsers

o  compiler
return the compiler to use for this class.
OBSOLETE: This is the old ST/X interface, kept for migration.
Don't use it - it will vanish.

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

o  compilerClass
return the compiler to use for this class -
this can be redefined in special classes, to compile classes with
JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax.

o  dllPath
if a class contains ExternalFunctions,
return a collection of pathNames where to find the DLLs
containing the external functions.

Do not code absolute path names here - keep them in the system settings.
Use this if the DLL location is kept in some registry entry.

o  evaluatorClass
return the compiler to use for expression evaluation for this class -
this can be redefined in special classes, to evaluate expressions with
JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax.

o  formatterClass
return the parser to use for formatting (prettyPrinting) this class -
this can be redefined in special classes, to format classes with
JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax.

o  language
return the programming language to use for this class.
OBSOLETE: This is an old interface which will vanish (easily confused with UI-national language).

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

o  parserClass
return the parser to use for parsing this class -
this can be redefined in special classes, to parse classes with
JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax.

o  programmingLanguage

o  subclassDefinerClass
Answer an evaluator class appropriate for evaluating definitions of new
subclasses of this class.

o  syntaxHighlighterClass
return the class to use for syntaxHighlighting (prettyPrinting) this class -
this can be redefined in special classes, to highlight classes with
JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax.

compiling
o  compile: code
compile code, aString for this class;
if successful update the method dictionary.
Returns the new method or nil (on failure).

o  compile: code categorized: methodCategory
compile code, aString for this class;
if successful update the method dictionary.
Returns the new method or nil (on failure).

o  compile: code categorized: methodCategory notifying: requestor
compile code, aString for this class;
if successful update the method dictionary.
Returns the new method or nil (on failure).

o  compile: code notifying: requestor
compile code, aString for this class; on any error, notify
requestor, anObject with the error reason.
Returns the new method or nil (on failure).

copying
o  canCloneFrom: anObject
return true, if this class can clone an obsolete object as retrieved
by a binary load. Subclasses which do not want to have obsolete objects
be converted, should redefine this method to return false.
(However, conversion is never done silently in a binary load; you
have to have a handler for the binaryload errors and for the conversion
request signal.)

o  cloneFrom: aPrototype
return an instance of myself with variables initialized from
a prototype.
This is eg. used when instances of obsolete classes are
binary loaded and a conversion is done on the obsolete object.
UserClasses may redefine this for better conversions.

usage example(s):

     Class withoutUpdatingChangesDo:[
         Point subclass:#Point3D
           instanceVariableNames:'z'
           classVariableNames:''
           poolDictionaries:''
           category:'testing'.
         (Point3D cloneFrom:1@2) inspect.
     ]

usage example(s):

     Class withoutUpdatingChangesDo:[
         Point variableSubclass:#Point3D
           instanceVariableNames:'z'
           classVariableNames:''
           poolDictionaries:''
           category:'testing'.
         (Point3D cloneFrom:#(1 2 3)) inspect.
     ]

o  deepCopyUsing: aDictionary postCopySelector: postCopySelector
return a deep copy of the receiver
- return the receiver here - time will show if this is ok

o  simpleDeepCopy
return a deep copy of the receiver
- return the receiver here - time will show if this is ok

dummy changes management
o  addChangeRecordForClassRemove: aClassName
add a change record that some class has been removed.
Defined as dummy here, since Behavior does not know about change management.
(only Classes do). This allows different Behavior-like
objects (alien classes) to be handled by the browser as well.

dummy fileOut
o  fileOutDefinitionOn: aStream
dummy fileOut defined here.
This allows different Behavior-like objects
(alien classes) to be handled by the browser as well.

enumerating
o  allDerivedInstancesDo: aBlock
evaluate aBlock for all of my instances and all instances of subclasses.
This method is going to be removed for protocol compatibility with
other STs; use allSubInstancesDo:

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

o  allInstancesDo: aBlock
evaluate aBlock for all of my instances

usage example(s):

     StandardSystemView allInstancesDo:[:v | Transcript showCR:(v name)]

o  allOwningclassesDo: aBlock
evaluate aBlock for all of my owners (i.e. owner, owner-of-owner etc).

usage example(s):

     Method::MethodWhoInfo allOwningclassesDo:[:c | Transcript showCR:(c name)]

o  allSelectorsAndMethodsDo: aTwoArgBlock
evaluate the argument, aBlock for all selectors of mySelf and my metaclass,
passing the corresponding method as second argument

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

o  allSubInstancesDo: aBlock
evaluate aBlock for all of my instances and all instances of subclasses

usage example(s):

     StandardSystemView allSubInstancesDo:[:v | Transcript showCR:(v name)]

o  allSubclassesDo: aBlock
evaluate aBlock for all of my subclasses.
There is no specific order, in which the entries are enumerated.
Warning:
This will only enumerate globally known classes - for anonymous
behaviors, you have to walk over all instances of Behavior.

usage example(s):

     Collection allSubclassesDo:[:c | Transcript showCR:(c name)]
     Collection class allSubclassesDo:[:c | Transcript showCR:(c name)]

o  allSubclassesInOrderDo: aBlock
evaluate aBlock for all of my subclasses.
The subclasses are enumerated breadth first (i.e. all of a classes superclasses
come before a class, which comes before any of its subclasses).
However, within one inheritance level, there is no specific order,
in which the entries are enumerated.
Warning:
This will only enumerate globally known classes - for anonymous
behaviors, you have to walk over all instances of Behavior.

usage example(s):

     Collection allSubclassesInOrderDo:[:c | Transcript showCR:(c name)]
     Collection class allSubclassesInOrderDo:[:c | Transcript showCR:(c name)]

o  allSuperclassesDo: aBlock
evaluate aBlock for all of my superclasses

usage example(s):

     String allSuperclassesDo:[:c | Transcript showCR:(c name)]

o  instAndClassMethodsDo: aOneArgBlock
evaluate the argument, aBlock for all methods of mySelf and my metaclass
See selectorsAndMethodsDo: for a method which only enumerates methods here.

o  instAndClassSelectorsAndMethodsDo: aTwoArgBlock
evaluate the argument, aBlock for all selectors of mySelf and my metaclass,
passing the corresponding method as second argument.
This enumerates methods both here and in my corresponding nonMeta/meta class.
See selectorsAndMethodsDo: for a method which only enumerates methods here.

o  methodsDo: aOneArgBlock
evaluate the argument, aBlock for all my methods.
This only enumerates methods contained here,
not in my corresponding nonMeta/meta class.
See instAndClassMethodsDo: for a method which does this.

usage example(s):

     UndefinedObject methodsDo:[:m | Transcript showCR:m whoString]
     UndefinedObject selectorsDo:[:sym | Transcript showCR:sym]
     UndefinedObject methodDictionary

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

o  selectorsAndMethodsDo: aTwoArgBlock
evaluate the argument, aBlock for all my selectors,
passing the corresponding method as second argument.
This only enumerates methods contained here,
not in my corresponding nonMeta/meta class.
See instAndClassSelectorsAndMethodsDo: for a method which does this.

o  selectorsDo: aOneArgBlock
evaluate the argument, aBlock for all my selectors.
This only enumerates selectors of methods contained here,
not in my corresponding nonMeta/meta class.

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  whichClassSatisfies: aBlock
return the first class along the superclass-chain, which satisfies aBlock.
Return nil, if there is none.

usage example(s):

     SimpleView whichClassSatisfies:[:cls | cls instanceVariableNames includes:'gc']

o  withAllSubclassesDo: aBlock
evaluate aBlock for mySelf and all of my subclasses.
There is no specific order, in which the entries are enumerated.
Warning:
This will only enumerate globally known classes - for anonymous
behaviors, you have to walk over all instances of Behavior.

usage example(s):

     Collection withAllSubclassesDo:[:c | Transcript showCR:(c name)]
     Collection class withAllSubclassesDo:[:c | Transcript showCR:(c name)]

o  withAllSuperclassesDo: aBlock
evaluate aBlock for the class and all of its superclasses

usage example(s):

     String withAllSuperclassesDo:[:each| Transcript showCR:each]

error handling
o  abstractClassInstantiationError
sent by an abstract classes redefined new method

initialization
o  deinitialize
deinitialize is sent to a class before it is physically unloaded.
This is only done with classes which have been loaded in from a binary
file. Classes may release any primitive memory or other stuff which is
not visible to smalltalk (for example, release internal memory).
The default action here is to do nothing.

o  initialize
initialize is sent to a class either during startup,
(for all statically compiled-in classes) or after a class
has been loaded into the system (either bytecodes or machinecode).
The default action here is to do nothing.

o  postAutoload
postAutoload is sent to a class after it has been autoloaded.
This gives it a chance to arrange for automatic unloading to be done
after a while ...
This is NOT sent to statically compiled in or explicitely filedIn
classes.
The default action here is to do nothing.

o  reinitialize
reinitialize is sent to a class when an image has been restarted.
I.e. when the system is restarted.
This gives classes a chance to flush any device dependent or otherwise
obsolete data which may be a leftover from the previous live.
The default action here is to do nothing.

inspecting
o  inspectorExtraAttributes
( an extension from the stx:libtool package )
extra (pseudo instvar) entries to be shown in an inspector.

o  inspectorValueListIconFor: anInspector
( an extension from the stx:libtool package )
returns the icon to be shown alongside the value list of an inspector

o  inspectorValueStringInListFor: anInspector
( an extension from the stx:libtool package )
returns a string to be shown in the inspector's selection list

instance creation
o  basicNew
return an instance of myself without indexed variables.
If the receiver-class has indexed instvars, the new object will have
a basicSize of zero -
i.e. 'aClass basicNew' is equivalent to 'aClass basicNew:0'.

** Do not redefine this method in any class **

o  basicNew: anInteger
return an instance of myself with anInteger indexed variables.
If the receiver-class has no indexed instvars, this is only allowed
if the argument, anInteger is zero.
** Do not redefine this method in any class **

o  decodeFromLiteralArray: anArray
create & return a new instance from information encoded in anArray.

usage example(s):

     Rectangle
	decodeFromLiteralArray:#(Rectangle 10 10 100 100)

o  new
return an instance of myself without indexed variables

o  new: anInteger
return an instance of myself with anInteger indexed variables

o  niceBasicNew: anInteger
same as basicNew:anInteger, but tries to avoid long pauses
due to garbage collection. This method checks to see if
allocation is possible without a pause, and does a background
incremental garbage collect first if there is not enough memory
available at the moment for fast allocation.
This is useful in low-priority background processes which like to
avoid disturbing any higher priority foreground process while allocating
big amounts of memory. Of course, using this method only makes
sense for big or huge objects (say > 200k).

EXPERIMENTAL: this is a non-standard interface and should only
be used for special applications. There is no guarantee, that this
method will be available in future ST/X releases.

o  readFrom: aStream
read an object's printed representation from the argument, aStream
and return it.
The read object must be a kind of myself;
if it's not, an error is raised.
This is the reverse operation to 'storeOn:'.

WARNING: storeOn: does not handle circular references and multiple
references to the same object.
Use #storeBinary:/readBinaryFrom: for this.

o  readFrom: aStream onError: exceptionBlock
read an object's printed representation from the argument, aStream
and return it (i.e. the stream should contain some representation of
the object which was created using #storeOn:).
The read object must be a kind of myself.
If it's not, the value of exceptionBlock is returned.
To get any object, use 'Object readFrom:...',
To get any number, use 'Number readFrom:...' and so on.
This is the reverse operation to 'storeOn:'.

WARNING: storeOn: does not handle circular references and multiple
references to the same object.
Use #storeBinary:/readBinaryFrom: for this.

usage example(s):

     Object readFrom:'''abc''' onError:['bla']
     Object readFrom:'illegal' onError:['bla']
     String readFrom:'illegal' onError:'bla'

o  readFromString: aString
create an object from its printed representation.
For most classes, the string is expected to be in a format created by
storeOn: or storeString; however, some (Time, Date) expect a user
readable string here.
See comments in Behavior>>readFromString:onError:,
Behavior>>readFrom: and Behavior>>readFrom:onError:

usage example(s):

     Integer readFromString:'12345678901234567890'
     Point readFromString:'1@2'
     Point readFromString:'1'

o  readFromString: aString onError: exceptionBlock
create an object from its printed representation.
Here, the string is expected to be in a format created by
storeOn: or storeString;
However, some classes (Time, Date) may redefine it to expect a user readable string here.
See comments in Behavior>>readFrom: and Behavior>>readFrom:onError:

usage example(s):

     Integer readFromString:'12345678901234567890'
     Integer readFromString:'abc'
     Integer readFromString:'abc' onError:0
     Point readFromString:'1@2'
     Point readFromString:'0'
     Point readFromString:'0' onError:[0@0]

o  uninitializedNew
create an instance of myself with uninitialized contents.
For all classes except ByteArray, this is the same as #basicNew.

o  uninitializedNew: anInteger
create an instance of myself with uninitialized contents.
For all classes except ByteArray, this is the same as #basicNew:.

misc ui support
o  browse
open a browser showing the receiver. Returns the browser

usage example(s):

     Array browserClass
     Array browse

o  browse: selector
open a browser showing the receiver.
Returns the browser

usage example(s):

     Array browse:#at:put:

o  classOperationsMenu
a chance to return additional menu items for the browser's class-menu

o  iconInBrowserSymbol
( an extension from the stx:libtool package )
can be redefined for a private icon in the browser (for me and my subclasses).
The returned symbol must be a selector of the ToolbarIconLibrary.
The browser will use this as index into the toolbariconlibrary

o  sourceCodeTemplate

o  toolListIcon
VisualWorks icon retrieval for the browser list.
Only redefined in VW classes.
Notice, that ST/X uses a better scheme, where the class only
returns a symbol, which is used to map into the icon library.
Thus allowing different icons as per view style

printing & storing
o  displayOn: aGCOrStream
return a string to display the receiver - include the
count for your convenience.

although behaviors have no name, we return something
useful here - there are many places (inspectors) where
a classes name is asked for.
Implementing this message here allows instances of anonymous classes
to show a reasonable name.

o  printOn: aStream

private-accessing
o  flags: aNumber
set the flags.
see flagXXX methods on my class side for details.
This method is for special uses only - there will be no recompilation
and no change record written here;
Warning:
the flags slot specifies the layout and behavior of my instances slots
and affects both the VM's and the class library's behavior.
It is required to be consistent and correct.
Setting it to a wrong value may severely affect the system's operation,
and even crash the system (in the garbage collector).
Do NOT use it, unless you really know what you are doing.

o  instSize: aNumber
set the instance size.
This method is for special uses only - there will be no recompilation
and no change record written here;
Warning:
the instSize slot specifies the size of my instances and affects
both the VM's and the class library's behavior.
It is required to be consistent and correct.
Setting it to a wrong value may severely affect the system's operation,
and even crash the system (in the garbage collector).
Do NOT use it, unless you really know what you are doing.

o  primAddSelector: aSelector withMethod: newMethod
add the method given by 2nd argument under the selector given by
the 1st argument to the methodDictionary.
Does NOT flush any caches, does NOT write a change record.

Do not use this in normal situations, strange behavior will be
the consequence.
I.e. executing obsolete methods, since the old method will still
be executed out of the caches.

o  setMethodDictionary: dict
set the receiver's method dictionary.
Convert dict to a MethodDictionary if necessary.
Do not flush inline caches, therefore old cached methods may be executed
after this call

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 Behavior>>superclass: (or flush the caches, at least)

o  setSuperclass: aClass instSize: i
set some inst vars.
this method is for special uses only - there will be no recompilation
and no change record is 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 Behavior>>superclass: (or flush the caches, at least)

o  setSuperclass: aClass methodDictionary: d instSize: i flags: f
set some inst vars.
this method is for special uses only - there will be no recompilation
and no change record is 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 Behavior>>superclass: (or flush the caches, at least)

private-helpers
o  addAllClassVarNamesTo: aCollection
helper - add the name-strings of the class variables and of the class-vars
of all superclasses to the argument, aCollection. Return aCollection

o  addAllInstVarNamesTo: aCollection
helper for allInstVarNames - add the name-strings of the instance variables
and of the inst-vars of all superclasses to the argument, aCollection.
Return aCollection.

o  getLookupObject
return the lookupObject (Jan's MetaObjectProtocol support) or nil.
If non-nil, no lookup is performed by the VM, instead the lookupObject
has to provide a method object for message sends.

o  setLookupObject: aLookupObjectOrNil
set the lookupObject (Jan's MetaObjectProtocol support) or nil.
If non-nil, no lookup is performed by the VM, instead the lookupObject
has to provide a method object for message sends.

queries
o  category
return the category of the class.
Returning nil here, since Behavior does not define a category
(only ClassDescriptions do).

usage example(s):

     Point category
     Behavior new category

o  comment
return the comment of the class.
Returning nil here, since Behavior does not define a category
(only Classes do). This allows different Behavior-like objects
(alien classes) to be handled by the browser as well.

o  definitionSelector
return the selector with which I was (can be) defined in my superclass

usage example(s):

     Object definitionSelector
     Array definitionSelector
     ByteArray definitionSelector
     FloatArray definitionSelector

o  definitionSelectorPrivate
return the selector with which I was (can be) defined in my superclass
as a private class

usage example(s):

     Array definitionSelector
     Array definitionSelectorPrivate

o  environment
return the namespace I am contained in; ST-80 compatible name.
Not normally needed here, but added to allow for instances of anonymous behaviours
to be inspected or browsed.

o  firstDefinitionSelectorPart
return the first part of the selector with which I was (can be) defined in my superclass

o  fullName
Answer the name of the receiver, fully qualified.

o  hasExtensions

o  isAbstract
true if this is an abstract class
(has no direct instances, should not be instantiated).
Usually, this means that it only provides shared protocol for its
subclasses, which should be used.
Notice: this does not have any semantic effect;
it is purely for the browser (shows an 'A'-Indicator)
and for documentation.
To enforce abstractness, a subclass should redefine new, to raise an exception.
(which some do, but many are too lazy to do)

o  isBehavior
return true, if the receiver is describing another object's behavior.
Defined to avoid the need to use isKindOf:

usage example(s):

     True isBehavior
     true isBehavior

o  isBrowserStartable

o  isBuiltInClass
return true if this class is known by the run-time-system.
Here, false is returned as default.
Notice, this is instance protocol, which means that any class
other than those special ones) are non-builtIn by default.

o  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).
Not normally needed here, but added to allow for instances of anonymous behaviours
to be inspected or browsed.

o  isPrivate
return true, if the receiver is some private class

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  isUtilityClass
a utility class is one which is not to be instantiated,
but only provides a number of utility functions on the class side.
It is usually also abstract

o  isVisualStartable

o  logFacility
the 'log facility';
this is used by the Logger both as a prefix to the log message

o  methodsCount
( an extension from the stx:libtool package )
Return a number of methods or nil if number of methods
is not known (such as for lazy-loaded classes)

o  name
although behaviors have no name, we return something
useful here - there are many places (inspectors) where
a classes name is asked for.
Implementing this message here allows anonymous classes
and instances of them to be inspected.

o  nameInBrowser
return a nameString as shown in browsers

o  nameSpace
return the namespace I am contained in.
Not normally needed here, but added to allow for instances of anonymous behaviours
to be inspected or browsed.

o  nameWithArticle
return a string consisting of classname preceeded by an article.
(don't expect me to write national variants for this ... :-)
If you have special preferences, redefine it...

usage example(s):

     SmallInteger nameWithArticle

o  owningClass
return my owning class - nil if I am a public class

o  owningClassOrYourself
return my owning class if I am private, myself otherwise

o  privateClassesAt: aClassNameStringOrSymbol
return a private class if present; nil otherwise.
Not normally needed here, but added to allow for instances of anonymous behaviours
to be inspected or browsed.

o  realSharedPoolNames
this returns the namespace aware pool names.
Not normally needed here, but added to allow for instances of anonymous behaviours
to be inspected or browsed.

o  revision

o  sourceCodeAt: aSelector
return the method's source for given selector aSelector or nil.
Only methods in the receiver - not in the superclass chain are considered.

usage example(s):

     True sourceCodeAt:#ifTrue:
     Object sourceCodeAt:#==
     Behavior sourceCodeAt:#sourceCodeAt:

o  sourceCodeAt: aSelector ifAbsent: exceptionalValue
return the method's source for given selector aSelector or exceptionalValue.
Only methods in the receiver - not in the superclass chain are considered.

o  sourceCodeManager
return the sourceCodeManager of the class.
Returning nil here, since Behavior does not define any sourceCode management.
(only Classes do). This allows different Behavior-like objects
(alien classes) to be handled by the browser as well.

o  supportsMethodCategories
return true, if my methods are categorized.
This is a hook for the browser to allow alien classes
to be handled (actually, this is not yet used).

o  theMetaclass
return the metaClass of the class-meta pair.
Here, return my metaclass object, because I am the class.
Also implemented in my metaclass, which returns itself.

o  theNonMetaclass
return the nonMetaClass of the class-meta pair.
Here, return myself, because I am the nonMetaclass.
Also implemented in my metaclass, which also returns me.
Sigh: ST/X naming; Squeak calls this theNonMetaClass

o  topNameSpace
return the nameSpace of my topOwningClass (if private) or my own nameSpace.
Not normally needed here, but added to allow for instances of anonymous behaviours
to be inspected or browsed.

o  topOwningClass
return my outermost owning class - nil if I am a public class

queries-inheritance
o  allSubclasses
return a collection of all subclasses (direct AND indirect) of
the receiver. There will be no specific order, in which entries
are returned. NameSpaces are excluded from the list.

usage example(s):

     Collection allSubclasses

o  allSubclassesInOrder
return a collection of all subclasses (direct AND indirect) of
the receiver. Higher level subclasses will come before lower ones.
NameSpaces are excluded from the list.

usage example(s):

     Collection allSubclassesInOrder

o  allSuperclasses
return a collection of the receiver's accumulated superclasses

usage example(s):

     String allSuperclasses

o  canBeSubclassed
return true, if it's allowed to create subclasses of the receiver.
This method is redefined in SmallInteger and UndefinedObject, since
instances are detected by their pointer-fields, i.e. they do not have
a class entry (you don't have to understand this :-)

o  commonSuperclass: aClass
Return the common superclass of the receiver and aClass.
Assumes that there is a common superclass of any two classes.
(might return nil, if either the receiver or the argument inherits from nil)

usage example(s):

     Integer commonSuperclass:Fraction
     SmallInteger commonSuperclass:Fraction
     View commonSuperclass:Form
     View commonSuperclass:Image
     View commonSuperclass:View
     Integer commonSuperclass:Autoload
     Integer commonSuperclass:Object

o  hasMultipleSuperclasses
Return true, if this class inherits from other classes
(beside its primary superclass).
This method is a preparation for a future multiple inheritance extension
- currently it is not supported by the VM

o  includesBehavior: aClass
return true, if the receiver includes the behavior of aClass;
i.e. if is either identical to a class or inherits from it.

usage example(s):

     True includesBehavior:Object
     True includesBehavior:Boolean
     True includesBehavior:True
     True includesBehavior:False

o  inheritsFrom: aClass
return true, if the receiver inherits methods from aClass;
i.e. if aClass is on the receiver's superclass chain.

usage example(s):

     True inheritsFrom:Object
     LinkedList inheritsFrom:Array

o  isSubclassOf: aClass
return true, if I am a subclass of the argument, aClass

usage example(s):

     String isSubclassOf:Collection
     LinkedList isSubclassOf:Array
     1 isSubclassOf:Number              <- will fail since 1 is no class
     Number isSubclassOf:1

o  mutableClass
Return a version of me with mutable instances.
Only redefined in the immutable collections
(of which instances are created by the compiler)

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

o  superclasses
return a collection of the receiver's immediate superclasses.
This method is a preparation for a future multiple inheritance extension
- currently it is not supported by the VM

usage example(s):

     String superclasses

o  withAllSubclasses
return a collection containing the receiver and
all subclasses (direct AND indirect) of the receiver

usage example(s):

     Collection withAllSubclasses

o  withAllSuperclasses
return a collection containing the receiver and all
of the receiver's accumulated superclasses

usage example(s):

     String withAllSuperclasses

queries-instances
o  allDerivedInstances
return a collection of all instances of myself and
instances of all subclasses of myself.
This method is going to be removed for protocol compatibility with
other STs; use allSubInstances

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

o  allInstances
return a collection of all my instances

usage example(s):

     ScrollBar allInstances

o  allInstancesForWhich: predicate do: action
perform action on all instances for which predicate returns true

usage example(s):

     ScrollBar allInstancesForWhich:[:s | s shown] do:[:s | Transcript showCR:s topView label]

o  allInstancesSelect: predicate
return all instances for which predicate returns true

usage example(s):

     ScrollBar allInstancesSelect:[:s | s shown]

o  allInstancesWeakly: doWeakly
return a collection of all my instances.
If weakly is true, a weak collection is returned.

o  allSubInstances
return a collection of all instances of myself and
instances of all subclasses of myself.

usage example(s):

     View allSubInstances

o  anyInstance
return any of my instances; raise an error, if there is none

usage example(s):

     ScrollBar anyInstance
     SmallInteger anyInstance

o  anySubInstance
return any of my or derived instances; raise an error, if there is none

usage example(s):

     View anySubInstance

o  derivedInstanceCount
return the number of instances of myself and of subclasses

usage example(s):

     View derivedInstanceCount
     SequenceableCollection derivedInstanceCount
     Object derivedInstanceCount

o  hasDerivedInstances
return true, if there are any instances of myself or of any subclass

usage example(s):

     Object hasDerivedInstances         - certainly true
     SharedQueue hasDerivedInstances

o  hasImmediateInstances
return true if this class has immediate instances
i.e. if the instances are represented in the pointer itself and
no real object header/storage is used for the object.
Redefined in classes which have so (only SmallInteger and UndefinedObject)

o  hasImmutableInstances
are this classes' instances immutable?

o  hasInstances
return true, if there are any instances of myself

usage example(s):

     Object hasInstances
     SequenceableCollection hasInstances
     Float hasInstances
     SmallInteger hasInstances

o  hasSharedInstances
return true if this class has shared instances, that is, instances
with the same value are identical.
False is returned here, only redefined in classes which have unified
instances (or should be treated so).

o  instanceCount
return the number of instances of myself.

usage example(s):

     View instanceCount
     Object instanceCount
     Float instanceCount
     SequenceableCollection instanceCount
     SmallInteger instanceCount   .... mhmh - hear, hear

queries-instlayout
o  elementByteSize
for bit-like containers, return the number of bytes stored per element.
For pointer indexed classes, 0 is returned

o  isAlienBehavior
Returns true iff I'm an alien behavior.

o  isBits
return true, if instances have indexed byte or short instance variables.
Ignore long, float and double arrays, since ST-80 code using isBits are probably
not prepared to handle them correctly.

o  isBitsExtended
return true, if instances have indexed byte, short, long or longlong instance variables.
Ignore float and double arrays.
This is really the thing we expect #isBits to return, however, #isBits
is defined to only return true for byte- and wordIndexed instances.
This avoids confusion of ST80 code, which is not prepared for long or longLong
instVars.

o  isBytes
return true, if instances have indexed byte instance variables

o  isDoubles
return true, if instances have indexed double instance variables

o  isFixed
return true, if instances do not have indexed instance variables

o  isFloats
return true, if instances have indexed float instance variables

o  isFloatsOrDoubles
return true, if instances have indexed float or double instance variables

usage example(s):

     (Object new) class isFloatsOrDoubles
     (Point new) class isFloatsOrDoubles
     (Array new) class isFloatsOrDoubles
     (ByteArray new) class isFloatsOrDoubles
     (FloatArray new) class isFloatsOrDoubles
     (DoubleArray new) class isFloatsOrDoubles

o  isLongLongs
return true, if instances have indexed long-long instance variables (8 byte uints)

o  isLongs
return true, if instances have indexed long instance variables (4 byte uints)

o  isPointers
return true, if instances have pointer instance variables
i.e. are either non-indexed or have indexed pointer variables

o  isSignedLongLongs
return true, if instances have indexed signed long-long instance variables (8 byte ints)

o  isSignedLongs
return true, if instances have indexed signed long instance variables (4 byte ints)

o  isSignedWords
return true, if instances have indexed signed short instance variables

o  isVariable
return true, if instances have indexed instance variables

o  isWeakPointers
return true, if instances have weak pointer instance variables

o  isWords
return true, if instances have indexed short instance variables

o  sizeOfInst: n
return the number of bytes required for an instance of
myself with n indexed instance variables.
The argument n should be zero for classes without indexed instance variables.
See Behavior>>niceNew: for an application of this.

usage example(s):

	DoubleArray sizeOfInst:8
	IntegerArray sizeOfInst:8

queries-protocol
o  allSelectors
return a collection of all selectors understood by the receiver;
this includes my selectors and all superclass selectors
(i.e. the receiver's full protocol)

usage example(s):

     Point allSelectors
     View allSelectors
     Array allSelectors

o  cachedLookupMethodFor: aSelector
return the method, which would be executed if aSelector was sent to
an instance of the receiver. I.e. the selector arrays of the receiver
and all of its superclasses are searched for aSelector.
Return the method, or nil if instances do not understand aSelector.
This interface provides exactly the same information as #lookupMethodFor:,
but uses the lookup-cache in the VM for faster search.
However, keep in mind, that doing a lookup through the cache also adds new
entries and can thus slow down the system by polluting the cache with
irrelevant entries. (do NOT loop over all objects calling this method).
Does NOT (currently) handle MI

usage example(s):

     String cachedLookupMethodFor:#=
     String cachedLookupMethodFor:#asOrderedCollection

o  canUnderstand: aSelector
return true, if the receiver or one of its superclasses implements aSelector.
(i.e. true if my instances understand aSelector).
I think this is a bad name (it sounds more like instance protocol,
and something like #instancesRespondTo: would have been better),
but well, we are compatible (sigh).

usage example(s):

     True canUnderstand:#ifTrue:
     True canUnderstand:#==
     True canUnderstand:#do:

o  compiledMethodAt: aSelector
return the method for given selector aSelector or nil.
Only methods in the receiver - not in the superclass chain are tested.

usage example(s):

     Object compiledMethodAt:#==
     (Object compiledMethodAt:#==) category

o  compiledMethodAt: aSelector ifAbsent: exceptionValue
return the method for given selector aSelector or the value
of exceptionValue if not present.
Only methods in the receiver - not in the superclass chain are tested.

usage example(s):

     Object compiledMethodAt:#==
     (Object compiledMethodAt:#==) category

o  compiledMethodNamed: methodName
Warning: this method is here to support multiple languages.
Do not use in code that works just with the smalltalk code.
Use compiledMethodAt: selector instead

usage example(s):

     Object compiledMethodNamed:#==
     (Object compiledMethodNamed:#==) category

o  compiledMethodNamed: name ifAbsent: exceptionValue
Warning: this method is here to support multiple languages.
Do not use in code that works just with the smalltalk code.
Use compiledMethodAt: selector instead

usage example(s):

     Object compiledMethodNamed:#==
     (Object compiledMethodNamed:#==) category

o  containsMethod: aMethod
Return true, if the argument, aMethod is a method of myself

o  hasMethods
return true, if there are any (local) methods in this class

usage example(s):

     True hasMethods
     True class hasMethods

o  implements: aSelector
return true, if the receiver implements aSelector.
(i.e. implemented in THIS class - NOT in a superclass).
This is semantically equivalent to includesSelector: (which is ST/80/Squeak compatibility).

Caveat:
This simply checks for the selector being present in the classes
selector table - therefore, it does not care for ignoredMethods.
(but: you should not use this method for protocol-testing, anyway).

Hint:
Don't use this method to check if someone responds to a message -
use #canUnderstand: on the class or #respondsTo: on the instance
to do this.

o  includesSelector: aSelector
return true, if the methodDictionary of THIS class includes a method for aSelector.
(i.e. if aSelector is implemented in THIS class - NOT in a superclass).
This is semantically equivalent to implements: (ST/80/Squeak compatibility).

Hint:
Don't use this method to check if someone responds to a message -
use #canUnderstand: on the class or #respondsTo: on the instance
to do this.

Caveat:
This simply checks for the selector being present in the classes
selector table - therefore, it does not care for ignoredMethods.
(but: you should not use this method for protocol-testing, anyway).

usage example(s):

     Object includesSelector:#==
     Object includesSelector:#murks
     Object includesSelector:nil

o  instAndClassMethods

o  lookupMethodFor: aSelector
return the method, which would be executed if aSelector was sent to
an instance of the receiver. I.e. the selector arrays of the receiver
and all of its superclasses are searched for aSelector.
Return the method, or nil if instances do not understand aSelector.
EXPERIMENTAL: take care of multiple superclasses.

o  responseTo: aSelector
return the method (from here or the inheritance chain),
which implements aSelector; return nil if none.

usage example(s):

     String responseTo:#==
     String responseTo:#collect:
     String responseTo:#,

o  selectorAtMethod: aMethod
Return the selector for given method aMethod.

o  selectorAtMethod: aMethod ifAbsent: failBlock
return the selector for given method aMethod
or the value of failBlock, if not found.

o  whichClassImplements: aSelector
obsolete interface;
use whichClassIncludesSelector: for ST-80 compatibility.

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

o  whichClassIncludesSelector: aSelector
return the class in the inheritance chain, which implements the method
for aSelector; return nil if none.
EXPERIMENTAL: handle multiple superclasses

usage example(s):

     String whichClassIncludesSelector:#==
     String whichClassIncludesSelector:#collect:

queries-variables
o  allClassVarNames
return a collection of all the class variable name-strings
this includes all superclass-class variables

usage example(s):

     Float allClassVarNames

o  allInstVarNames
return a collection of all the instance variable name-strings
this includes all superclass-instance variables.
Instvars of superclasses come first (i.e. the position matches
the instVarAt:-index).

usage example(s):

     Point allInstVarNames 

     Dictionary instVarNames
     Dictionary allInstVarNames

o  allInstanceVariableNames
alias for allInstVarNames

o  classVarNames
return a collection of the class variable name-strings.
Returning empty here, since Behavior does not define any classVariables.
(only Classes do). This allows different Behavior-like objects
(alien classes) to be handled by the browser as well.
Traditionally, this was called classVarNames, but newer versions of squeak
seem to have changed to use classVariableNames.
So you probably should use the alias

o  classVariableNames
alias for classVarNames.
Traditionally, this was called classVarNames, but newer versions of squeak
seem to have changed to use classVariableNames.
So you probably should use this alias

usage example(s):

     Infinity classVariableNames

o  classVariableString
return a string of the class variables names.
Returning empty here, since Behavior does not define any classVariables.
(only Classes do). This allows different Behavior-like objects
(alien classes) to be handled by the browser as well.

o  instVarNameForIndex: index
Behavior does not provide this info - generate synthetic names.

o  instVarNames
return a collection of the instance variable name-strings.
Behavior does not provide this info - generate synthetic names.
Traditionally, this was called instVarNames, but newer versions of squeak
seem to have changed to use instanceVariableNames.
So you probably should use the alias

o  instanceVariableNames
alias for instVarNames.
Traditionally, this was called instVarNames, but newer versions of squeak
seem to have changed to use instanceVariableNames.
So you probably should use this alias

usage example(s):

     Point instanceVariableNames

o  instanceVariableString
return a string with dummy names here - typically, your
objects are instances of Class, not Behavior,
so this is only invoked for very artificial behaviors.

usage example(s):

     Behavior new instanceVariableString
     (Behavior new instSize:2) instanceVariableString

o  whichClassDefinesClassVar: aStringOrText
Behavior does not support classVariables

usage example(s):

     TextView whichClassDefinesClassVar:'CachedScales'
     TextView whichClassDefinesClassVar:'xxx'

o  whichClassDefinesInstVar: aString

o  whichSelectorsAssign: instVarName
Answer a set of selectors whose methods write the argument, instVarName,
as a named instance variable.

o  whichSelectorsRead: instVarName
Answer a set of selectors whose methods read the argument, instVarName,
as a named instance variable.

o  whichSelectorsReferTo: someLiteralConstant
return a collection of selectors of methods which refer to the argument.
Search the literal arrays of my methods to do this.

usage example(s):

     String whichSelectorsReferTo:#at:
     String whichSelectorsReferTo:CharacterArray

o  whichSelectorsReferToClassVariable: nameOfClassVariable
return a collection of selectors of methods which refer to the argument.
Search the literal arrays of my methods to do this.

usage example(s):

     Object whichSelectorsReferToClassVariable:#Dependencies

o  whichSelectorsReferToGlobal: nameOfGlobal
return a collection of selectors of methods which refer to the argument.
Search the literal arrays of my methods to do this.

usage example(s):

     Object whichSelectorsReferToGlobal:#Debugger

o  whichSelectorsWrite: instVarName
Answer a set of selectors whose methods write the argument, instVarName,
as a named instance variable.

snapshots
o  postSnapshot
sent by ObjectMemory to all classes, after a snapshot has been written.
Nothing done here. This can be redefined in classes which like to know
about snapshooting.

o  preSnapshot
sent by ObjectMemory to all classes, before a snapshot is written.
Nothing done here. This can be redefined in classes which like to know
about snapshooting.

tracing
o  traceInto: aRequestor level: level from: referrer
double dispatch into tracer, passing my type implicitely in the selector

visiting
o  acceptVisitor: aVisitor with: aParameter
dispatch for visitor pattern; send #visitBehavior:with: to aVisitor



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 28 Mar 2024 10:19:42 GMT