Traits

ClassTrait
While every class has an associated metaclass, a trait can have an associated classtrait, an instance of me. To preserve metaclass compatibility, the associated classtrait (if there is one) is automatically applied to the metaclass, whenever a trait is applied to a class. Consequently, a trait with an associated classtrait can only be applied to classes, whereas a trait without a classtrait can be applied to both classes and metaclasses.
asClassSideNode
asMCDefinition
asNode
baseClass:traitComposition:methodDict:localSelectors:organization:
baseTrait
baseTrait:
category
classTrait
classTrait:
compile:classified:withStamp:notifying:logSource:
copy
Make a copy of the receiver. Share the
reference to the base trait.
definitionST80
for:
hasClassTrait
includesBehavior:
initializeFrom:
initializeWithBaseTrait:
isBaseTrait
isClassTrait
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
soleInstance
traitComposition:methodDict:localSelectors:organization:
Used by copy of Trait
uses:
CodeModelExtension
A CodeModelExtension is xxxxxxxxx.
Instance Variables
perClassCache: <Object>
perClassCache
- xxxxx
cacheFor:
classChanged:
We dont want to provide an out of date reply
clearOut:
for:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isAbstract
FixedIdentitySet
This is a fast but lazy implementation of fixed size identity sets. The two main difference to regular identity sets are:
1) These identity sets have a fixed size. If they are full, adding another element doesn't have any effect.
2) No rehashing. If two elements were to be stored on the same position in the underlying array, one of them is simply discarded.
As a consequence of (1) and (2), these identity sets are very fast! Note that this class inherits form Array. This is not clean but reduces memory overhead when instances are created.
=
Answer true if the receiver is equivalent to the otherCollection.
First test for identity, then rule out different species and sizes of
collections. As a last resort, examine each element of the receiver
and the otherCollection.
add:
Include newObject as one of the receiver's elements. Answer newObject.
ArrayedCollections cannot respond to this message.
addAll:
Include all the elements of aCollection as the receiver's elements. Answer
aCollection. Actually, any object responding to #do: can be used as argument.
addAll:notIn:
arraySize
arraySizeForCapacity:
at:
Primitive. Assumes receiver is indexable. Answer the value of an
indexable element in the receiver. Fail if the argument index is not an
Integer or is out of bounds. Essential. See Object documentation
whatIsAPrimitive.
at:put:
Primitive. Assumes receiver is indexable. Store the argument value in
the indexable element of the receiver indicated by index. Fail if the
index is not an Integer or is out of bounds. Or fail if the value is not of
the right type for this kind of collection. Answer the value that was
stored. Essential. See Object documentation whatIsAPrimitive.
capacity
Answer the current capacity of the receiver.
defaultSize
destructiveAdd:
do:
Refer to the comment in Collection|do:.
hash
Answer an integer hash value for the receiver such that,
-- the hash value of an unchanged object is constant over time, and
-- two equal objects have equal hash values
includes:
Answer whether anObject is one of the receiver's elements.
indexOf:
Answer the index of the first occurence of anElement within the
receiver. If the receiver does not contain anElement, answer 0.
initializeCapacity:
isFull
new
new:
notFull
printOn:
Append a sequence of characters that identify the receiver to aStream.
readonlyWithAll:notIn:
remove:ifAbsent:
SequencableCollections cannot implement removing.
select:
Refer to the comment in Collection|select:.
size
Answer how many elements the receiver contains.
sizeFor:
with:
with:with:
with:with:with:
with:with:with:with:
with:with:with:with:with:
with:with:with:with:with:with:
withAll:
withAll:notIn:
LocalSends
This class provide the model extension describing local sends for a given class. These are described in the comment for SendInfo, which is the class that actually computes this information.
newCacheFor:
Creates an instance of SendCaches, assigns it to the instance variable sendCaches and fills it with all the self-sends class-sends and super-sends that occur in methods defined in this class (or by used traits).
LocatedMethod
I identify a method in the system by its selector and location (class or trait) where it is defined.
=
Answer whether the receiver and the argument represent the same
object. If = is redefined in any subclass, consider also redefining the
message hash.
argumentNames
Return an array with the argument names of the method's selector
category
hash
Answer a SmallInteger whose value is related to the receiver's identity.
May be overridden, and should be overridden in any classes that define =
isBinarySelector
location
location:selector:
method
selector
source
ModelExtension
A ModelExtension is xxxxxxxxx.
Instance Variables
interests: <Object>
lock: <Object>
interests
- xxxxx
lock
- xxxxx
current
current:
doWithTemporaryInstance:
haveInterestsIn:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isAbstract
lostInterest:in:
lostInterest:inAll:
noteInterestOf:in:
noteInterestOf:inAll:
ProvidedSelectors
A ProvidedSelectors is xxxxxxxxx.
Instance Variables
isSelector:providedIn:
newCacheFor:
QuickIntegerDictionary
This implementation serves as a very quick dictionary under the assumption that the keys are small natural numbers.
includesKey:
removeKey:
QuickStack
This class is a quick and dirty implementation of a stack, designed to be used in the
SendsInfo abstract interpreter. As opposed to using an OrderedCollection, this stack is quick because it can be emptied in a single assignment, and dirty because elements above the logical top of the stack (i.e., those that have been popped off) are not nil'ed out. For our application, these are important optimizations with no ill effects.
QuickStacks will expand beyond their initial size if required, but we intend that the initial size will always be sufficient, so the efficiency of this feature is not important.
addLast:
becomeEmpty
copy
Answer a copy of a myself
grow
initialize
Subclasses should redefine this method to perform initializations on instance creation
isEmpty
Answer whether the receiver contains any elements.
new
removeLast
removeLast:
setTop:
size
Answer how many elements the receiver contains.
RequiredSelectors
A RequiredSelectors is xxxxxxxxx.
Instance Variables
dirty: <Object>
dirtyClasses: <Object>
newlyInterestingClasses: <Object>
dirty
- xxxxx
dirtyClasses
- xxxxx
newlyInterestingClasses
- xxxxx
calculateForClass:
classChanged:
We dont want to provide an out of date reply
classesOfInterest
dirtyClasses
dirtyWithChange:
ensureClean
for:
Somewhat weird control flow, and populates the dictionary even with non-interesting things, which it probably shouldn't
lostInterest:inAll:
lostOneInterestIn:
newCacheFor:
newlyInteresting:
newlyInterestingClasses
newlyInterestingClasses:
noteInterestOf:inAll:
registerLifelongInterestOf:inAll:
RequiredSelectorsChangesCalculator
Nathanael implemented an efficient algorithm for updating the requirement status of a single selector for an inheritance subtree. However, the algorithm is not efficient enough to use as is for displaying abstractness of all the classes in a few class categories.
To get to that performance level:
1. The RequiredSelectors class coordinates recalculation requests and tracks what classes have changed, and what classes are interesting.
2. The current class handles a such request, by running the algorithm only on classes and selectors that may potentially be requirements.
addUpdatePathTo:from:
classesToUpdate
classesToUpdate:
decideParameters
decide whos who
doWork
findAffectedTraitsFrom:
findOriginalSins
findRootsAndRoutes
Based on the
1. target classes (ones considered interesting by our clients) and the
2. modifiedBehaviors (ones we are told might have changed),
decide the
A. rootClasses (superclasses of target classes that include methods from modifiedBehaviors)
B. classesToUpdate (classes that may have been affected AND are on an inheritance path between a root class and a target class, will be updated by the algorithm. This includes the every target class that may have been affected).
C. mapping from root classes to its classesToUpdate.
initialize
Subclasses should redefine this method to perform initializations on instance creation
modifiedBehaviors
modifiedBehaviors:
noteRoot:possiblyAffected:
onModificationOf:withTargets:
possiblyAffectedForRoot:
removeRequirements:thatAreNotIn:
removeRequirements:thatAreNotIn:ifIn:
rootClasses
rootClasses:
selectorsToUpdateIn:
setFoundRequirements:
shouldProcess:forSinsIn:
sinsIn:
storeOldRequirementsUnder:into:ignoreSet:
storeRequirementsUnder:for:in:
targetBehaviors
targetBehaviors:
traitsToUpdate
traitsToUpdate:
RequirementsCache
A RequirementsCache is xxxxxxxxx.
Instance Variables
requirements: <Object>
superRequirements: <Object>
requirements
- xxxxx
superRequirements
- xxxxx
addRequirement:
newRequirementsObject
removeRequirement:
requirements
superRequirements
Answer the value of superRequirements
SendCaches
Instances of this class are used to keep track of selectors that are sent to self, sent to super, and sent to the class-side in any of the methods of a certain class. It also keeps track of the requirements of a class.
It's important to understand that this class just serves as storage for these sets of selectors. It does not contain any logic to actually compute them. In particular, it cannot compute the requirements.
addClassSender:of:
addSelfSender:of:
addSuperSender:of:
allSentSelectorsAndSendersDo:
classSendersOf:
classSentSelectorsAndSendersDo:
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeAllInstances
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
properlyInitialize
selfSenders
selfSenders:
selfSendersOf:
selfSentSelectorsAndSendersDo:
superSenders
superSenders:
superSendersOf:
superSentSelectorsAndSendersDo:
SendInfo
SendInfo objects perform an abstract interpretation of a compiled method to ascertain the messages that are self-sent, super-sent and class-sent.
The idea is to simulate the execution of the instruction stream in the compiled method, keeping track of whether the values on the stack are self or some other value. IN one place we have to keep track of the small integers that are on the stack, becuase they determine how many elements are to be popped off of the stack.
Everything is fairly straighforward except for jumps.
Conditional forward jumps, as generated by ifTrue: and ifFalse:, are fairly easy. At the site of the conditional jump, we copy the stack, and use one copy on each path. When the paths eventually merge, the stacks should be the same size (if they aren't it's a compiler error!). We build a new stack that has #self on it every place where either of the old stacks had #self. Thus, expressions like
(aBoolean ifTrue: self ifFalse: other) foo: 3
that might send foo: 3 to self are recognized.
For unconditional jumps, we save the stack for use at the join point, and continue execution at the instruciton after the jump with an empty stack, which will be immediately overwritten by the stack that comes with the arriving execution.
The bottlenecks in this algorithm turned out to be detecting join points and simulating the stack. Using an OrderedCollection for a stack caused a lot of redundant work, especially when emptying the stack. Using a dictionary to detect join points turned out to be very slow, because of the possibility of having to scan through the hash table.
QuickIntegerDictionary and QuickStack provide the same core functionality, but in much more efficient forms.
Use SendInfo as follows:
(SendInfo on: aCompiledMethod) collectSends
aSendInfo is both an InstructionStream and an InstructionStream client.
Structure:
stack -- the simulated execution stack
savedStacks -- The dictionary on which the extra stacks waiting to be merged in are saved.
sentSelectors -- an Identity Set accumulating the set of sent selectors.
superSentSelectors -- an Identity Set accumulating the set of super sent selectors.
classSentSelectors -- an Identity Set accumulating the set of selectors sent to self class.
isStartOfBlock -- a flag indicating that we have found the start of a block, and that the next jump will skip over it.
numBlockArgs --
nr1' 'nr2' 'nr3' 'nr4')
addClassSentSelector:
addSelfSentSelector:
addSuperSentSelector:
assert:because:
Throw an assertion error if aBlock does not evaluates to true.
atMergePoint
blockReturn
we could empty the stack, but what's the point?
blockReturnTop
Return from a block with Top Of Stack as result.
The following instruction will be branched to from somewhere, and will
therefore trigger a stackMerge, so it is important that the stack be emptied.
classSentSelectors
collectSends
doDup
Simulate the action of a 'duplicate top of stack' bytecode.
doPop
emptyStack
home
Answer the context in which the receiver was defined.
interpretNextInstructionFor:
Send to the argument, client, a message that specifies the type of the
next instruction.
jump:
Simulate the action of a 'unconditional jump' bytecode whose
offset is the argument, distance.
jump:if:
Simulate the action of a 'conditional jump' bytecode whose offset is
distance, and whose condition is aBooleanConstant.
mergeStacks
method:pc:
methodReturnConstant:
Simulate the action of a 'return receiver' bytecode. This corresponds to
the source expression '^aConstant'.
methodReturnReceiver
Simulate the action of a 'return receiver' bytecode. This corresponds to
the source expression '^self'.
methodReturnTop
Simulate the action of a 'return receiver' bytecode. This corresponds to
the source expression '^ <result of the last evaluation>'.
neverRequiredSelectors
newEmptyStack
pop
pop:
popIntoLiteralVariable:
Simulate the action of bytecode that removes the top of the stack and
stores it into a literal variable of my method.
popIntoReceiverVariable:
Simulate the action of bytecode that removes the top of the stack and
stores it into an instance variable of my receiver.
popIntoRemoteTemp:inVectorAt:
Simulate the action of bytecode that removes the top of the stack and stores
it into an offset in one of my local variables being used as a remote temp vector.
popIntoTemporaryVariable:
Simulate the action of bytecode that removes the top of the stack and
stores it into an instance variable of my receiver.
prepareState
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
push:
pushActiveContext
Simulate the action of bytecode that pushes the active context on the
top of its own stack.
pushClosureCopyNumCopiedValues:numArgs:blockSize:
Simulate the action of a 'closure copy' bytecode whose result is the
new BlockClosure for the following code
pushConsArrayWithElements:
pushConstant:
pushLiteralVariable:
pushNewArrayOfSize:
pushReceiver
pushReceiverVariable:
Push the value of one of the receiver's instance variables.
pushRemoteTemp:inVectorAt:
Simulate the action of bytecode that pushes the value at remoteTempIndex
in one of my local variables being used as a remote temp vector.
pushTemporaryVariable:
Simulate the action of bytecode that pushes the contents of the
temporary variable whose index is the argument, index, on the top of
the stack.
selfSentSelectors
send:super:numArgs:
Simulate the action of bytecodes that send a message with
selector. superFlag, tells whether the receiver of the
message was 'super' in the source. The arguments
of the message are found in the top numArgs locations on the
stack and the receiver just below them.
storeIntoLiteralVariable:
Simulate the action of bytecode that stores the top of the stack into a
literal variable of my method.
storeIntoReceiverVariable:
Simulate the action of bytecode that stores the top of the stack into an
instance variable of my receiver.
storeIntoRemoteTemp:inVectorAt:
Simulate the action of bytecode that stores the top of the stack at
an offset in one of my local variables being used as a remote temp vector.
storeIntoTemporaryVariable:
Simulate the action of bytecode that stores the top of the stack into one
of my temporary variables.
superSentSelectors
tallySelfSendsFor:
Logically, we do the following test:
(self neverRequiredSelectors includes: selector) ifTrue: [^ self].
However, since this test alone was reponsible for 2.8% of the execution time,
we replace it with the following:
top
TBehaviorCategorization
A TBehaviorCategorization is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
category
Answer the system organization category for the receiver. First check whether the
category name stored in the ivar is still correct and only if this fails look it up
(latter is much more expensive)
category:
Categorize the receiver under the system category, aString, removing it from
any previous categorization.
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
variablesAndOffsetsDo:
TComposingDescription
A TComposingDescription is xxxxxxxxx.
+
Use double dispatch to avoid having nested composition in cases where
parenthesis are used, such as T1 + (T2 + T3)
-
@
addCompositionOnLeft:
addOnTheLeft:
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
asTraitComposition
baseTrait
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
variablesAndOffsetsDo:
TPureBehavior
A TPureBehavior is xxxxxxxxx.
>>
Answer the compiled method associated with the argument, selector (a
Symbol), a message selector in the receiver's method dictionary. If the
selector is not in the dictionary, create an error notification.
addExclusionOf:to:
addSelector:withMethod:
addSelector:withMethod:notifying:
addSelectorSilently:withMethod:
addToComposition:
addTraitSelector:withMethod:
Add aMethod with selector aSymbol to my
methodDict. aMethod must not be defined locally.
allSelectors
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicAddSelector:withMethod:
Add the message selector with the corresponding compiled method to the
receiver's method dictionary.
Do this without sending system change notifications
basicCategory
basicCategory:
basicLocalSelectors
basicLocalSelectors:
basicRemoveSelector:
Assuming that the argument, selector (a Symbol), is a message selector
in my method dictionary, remove it and its method.
binding
bindingOf:
Answer the binding of some variable resolved in the scope of the receiver
canUnderstand:
Answer whether the receiver can respond to the message whose selector
is the argument.
canZapMethodDictionary
Return true if it is safe to zap the method dictionary on #obsolete
changeRecordsAt:
Return a list of ChangeRecords for all versions of the method at selector. Source code can be retrieved by sending string to any one. Return nil if the method is absent.
classAndMethodFor:do:ifAbsent:
Looks up the selector aSymbol in this class/trait. If it is found, binaryBlock is evaluated
with this class/trait and the associated method. Otherwise absentBlock is evaluated.
Note that this implementation is very simple because PureBehavior does not know
about inheritance (cf. implementation in Behavior)
classDefinitions
classTrait
classTrait:
clearSendCaches
compile:
Compile the argument, code, as source code in the context of the
receiver. Create an error notification if the code can not be compiled.
The argument is either a string or an object that converts to a string or a
PositionableStream on an object that converts to a string.
compile:classified:notifying:trailer:ifFail:
Compile code without logging the source in the changes file
compile:notifying:
Compile the argument, code, as source code in the context of the
receiver and insEtall the result in the receiver's method dictionary. The
second argument, requestor, is to be notified if an error occurs. The
argument code is either a string or an object that converts to a string or
a PositionableStream. This method also saves the source code.
compileAll
compileAllFrom:
Compile all the methods in the receiver's method dictionary.
This validates sourceCode and variable references and forces
all methods to use the current bytecode set
compiledMethodAt:
Answer the compiled method associated with the argument, selector (a
Symbol), a message selector in the receiver's method dictionary. If the
selector is not in the dictionary, create an error notification.
compiledMethodAt:ifAbsent:
Answer the compiled method associated with the argument, selector (a Symbol), a message selector in the receiver's method dictionary. If the selector is not in the dictionary, return the value of aBlock
compilerClass
Answer a compiler class appropriate for source methods of this class.
compress
Compact the method dictionary of the receiver.
compressedSourceCodeAt:
(Paragraph compressedSourceCodeAt: #displayLines:affectedRectangle:) size 721 1921
Paragraph selectors inject: 0 into: [:tot :sel | tot + (Paragraph compressedSourceCodeAt: sel) size] 13606 31450
copy
Answer a copy of the receiver without a list of subclasses.
copyOfMethodDictionary
Return a copy of the receiver's method dictionary
crossReference
Answer an Array of arrays of size 2 whose first element is a message selector in the receiver's method dictionary and whose second element is a set of all message selectors in the method dictionary whose methods send a message with that selector. Subclasses are not included.
decompile:
Find the compiled code associated with the argument, selector, as a
message selector in the receiver's method dictionary and decompile it.
Answer the resulting source code as a string. Create an error notification
if the selector is not in the receiver's method dictionary.
decompilerClass
Answer a decompiler class appropriate for compiled methods of this class.
deepCopy
Classes should only be shallowCopied or made anew.
defaultEnvironment
defaultMethodTrailer
defaultNameStemForInstances
Answer a basis for external names for default instances of the receiver.
For classees, the class-name itself is a good one.
deregisterLocalSelector:
emptyMethodDictionary
ensureLocalSelectors
Ensures that the instance variable localSelectors is effectively used to maintain
the set of local selectors.
This method must be called before any non-local selectors are added to the
method dictionary!
environment
Return the environment in which the receiver is visible
environment:
evaluatorClass
Answer an evaluator class appropriate for evaluating expressions in the
context of this class.
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
firstCommentAt:
Answer a string representing the first comment in the method associated with selector. Return an empty string if the relevant source file is not available, or if the method's source code does not contain a comment. Not smart enough to bypass quotes in string constants, but does map doubled quote into a single quote.
firstPrecodeCommentFor:
If there is a comment in the source code at the given selector that preceeds the body of the method, return it here, else return nil
flattenDown:
flattenDownAllTraits
formalHeaderPartsFor:
popeye
formalParametersAt:
Return the names of the arguments used in this method.
hasClassTrait
hasMethods
Answer whether the receiver has any methods in its method dictionary.
hasRequiredSelectors
hasTraitComposition
includesBehavior:
includesLocalSelector:
includesSelector:
Answer whether the message whose selector is the argument is in the
method dictionary of the receiver's class.
initialize
isAliasSelector:
Return true if the selector aSymbol is an alias defined
in my or in another composition somewhere deeper in
the tree of traits compositions.
isBaseTrait
isClassTrait
isDisabledSelector:
isLocalAliasSelector:
Return true if the selector aSymbol is an alias defined
in my trait composition.
isObsolete
isProvidedSelector:
isValidTraitName:
literalScannedAs:notifying:
Postprocesses a literal scanned by Scanner scanToken (esp. xLitQuote).
If scannedLiteral is not an association, answer it.
Else, if it is of the form:
nil->#NameOfMetaclass
answer nil->theMetaclass, if any has that name, else report an error.
Else, if it is of the form:
#NameOfGlobalVariable->anythiEng
answer the global, class, or pool association with that nameE, if any, else
add it to Undeclared a answer the new Association.
localSelectors
Return a set of selectors defined locally.
The instance variable is lazily initialized. If it is nil then there
are no non-local selectors
longPrintOn:
Append to the argument, aStream, the names and values of all of the receiver's instance variables. But, not useful for a class with a method dictionary.
lookupSelector:
methodDict
methodDict:
methodDictAddSelectorSilently:withMethod:
methodDictionary
Convenience
methodDictionary:
methodHeaderFor:
Answer the string corresponding to the method header for the given selector
methodsDo:
Evaluate aBlock for all the compiled methods in my method dictionary.
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
noteChangedSelectors:
Start update of my methodDict (after changes to traits in traitComposition
or after a local method was removed from my methodDict). The argument
is a collection of method selectors that may have been changed. Most of the time
aCollection only holds one selector. But when there are aliases involved
there may be several method changes that have to be propagated to users.
notifyUsersOfChangedSelector:
notifyUsersOfChangedSelectors:
obsolete
Invalidate and recycle local methods,
e.g., zap the method dictionary if can be done safely.
parseScope
parserClass
Answer a parser class to use for parsing method headers.
prettyPrinterClass
providedSelectors
purgeLocalSelectors
recompile:
Compile the method associated with selector in the receiver's method dictionary.
recompile:from:
Compile the method associated with selector in the receiver's method dictionary.
recompileChanges
Compile all the methods that are in the changes file.
This validates sourceCode and variable references and forces
methods to use the current bytecode set
recompileNonResidentMethod:atSelector:from:
Recompile the method supplied in the context of this class.
registerLocalSelector:
removeAlias:of:
removeFromComposition:
removeFromSystem
removeFromSystem:
removeSelector:
Assuming that the argument, selector (a Symbol), is a message selector
in my method dictionary, remove it and its method.

If the method to remove will be replaced by a method from my trait composition,
the current method does not have to be removed because we mark it as non-local.
If it is not identical to the actual method from the trait it will be replaced automatically
by #noteChangedSelectors:.

This is useful to avoid bootstrapping problems when moving methods to a trait
(e.g., from TPureBehavior to TMethodDictionaryBehavior). Manual moving (implementing
the method in the trait and then remove it from the class) does not work if the methods
themselves are used for this process (such as compiledMethodAt:, includesLocalSelector: or
addTraitSelector:withMethod:)
removeSelectorSilently:
Remove selector without sending system change notifications
removeTraitSelector:
rename:
requirements
selectors
Answer a Set of all the message selectors specified in the receiver's
method dictionary.
selectorsAndMethodsDo:
Evaluate selectorBlock for all the message selectors in my method dictionary.
selectorsDo:
Evaluate selectorBlock for all the message selectors in my method dictionary.
selectorsWithArgs:
Return all selectors defined in this class that take this number of arguments. Could use String.keywords. Could see how compiler does this.
selfSentSelectorsFromSelectors:
sendCaches
sendCaches:
setName:andRegisterInCategory:environment:
setRequiredStatusOf:to:
setTraitComposition:
setTraitCompositionFrom:
sourceCodeAt:
sourceCodeAt:ifAbsent:
sourceCodeTemplate
Answer an expression to be edited and evaluated in order to define
methods in this class or trait.
sourceMethodAt:
Answer the paragraph corresponding to the source code for the
argument.
sourceMethodAt:ifAbsent:
Answer the paragraph corresponding to the source code for the
argument.
spaceUsed
Answer a rough estimate of number of bytes used by this class and its metaclass. Does not include space used by class variables.
standardMethodHeaderFor:
storeLiteral:on:
Store aCodeLiteral on aStream, changing an Association to ##GlobalName
or ###MetaclassSoleInstanceName format if appropriate
superRequirements
thoroughWhichSelectorsReferTo:special:byte:
Answer a set of selectors whose methods access the argument as a
literal. Dives into the compact literal notation, making it slow but
thorough
traitComposition
Return my trait composition. Manipulating the composition does not
effect changes automatically. Use #setTraitComposition: to do this but
note, that you have to make a copy of the old trait composition before
changing it because only the difference between the new and the old
composition is updated.
traitComposition:
traitCompositionIncludes:
traitCompositionString
traitOrClassOfSelector:
Return the trait or the class which originally defines the method aSymbol
or return self if locally defined or if it is a conflict marker method.
This is primarly used by Debugger to determin the behavior in which a recompiled
method should be put. If a conflict method is recompiled it should be put into
the class, thus return self. Also see TraitComposition>>traitProvidingSelector:
traitTransformations
traits
Returns a collection of all traits used by the receiver
traitsProvidingSelector:
ultimateSourceCodeAt:ifAbsent:
Return the source code at selector
updateMethodDictionarySelector:
A method with selector aSymbol in myself or my traitComposition has been changed.
Do the appropriate update to my methodDict (remove or update method) and
return all affected selectors of me so that my useres get notified.
variablesAndOffsetsDo:
whichSelectorsReferTo:
Answer a Set of selectors whose methods access the argument as a
literal.
whichSelectorsReferTo:special:byte:
Answer a set of selectors whose methods access the argument as a literal.
withAllSubclassesDo:
withAllSuperclasses
Answer an OrderedCollection of the receiver and the receiver's
superclasses. The first element is the receiver,
followed by its superclass; the last element is Object.
TTransformationCompatibility
methods that make the user of this trait protocol-compatible with TraitTransformation.
When used in Trait and ClassTrait, this eliminates the need for TraitHolders.
aliasesForSelector:
allAliasesDict
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
changedSelectorsComparedTo:
classDefinitions
classTrait
classTrait:
collectMethodsFor:into:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
subject
for compatibility with TraitTransformations
trait
for compatibility with TraitTransformations
variablesAndOffsetsDo:
TApplyingOnClassSide
A TApplyingOnClassSide is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
assertConsistantCompositionsForNew:
Applying or modifying a trait composition on the class side
of a behavior has some restrictions.
baseTrait
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
noteNewBaseTraitCompositionApplied:
The argument is the new trait composition of my base trait - add
the new traits or remove non existing traits on my class side composition.
(Each class trait in my composition has its base trait on the instance side
of the composition - manually added traits to the class side are always
base traits.)
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
variablesAndOffsetsDo:
TClassAndTraitDescription
A TClassAndTraitDescription is xxxxxxxxx.
acceptsLoggingOfCompilation
Answer whether the receiver's method submisions and class defintions should be logged to the changes file and to the current change set. The metaclass follows the rule of the class itself. 6/18/96 sw
addAndClassifySelector:withMethod:inProtocol:notifying:
addSelector:withMethod:notifying:
addSelectorSilently:withMethod:
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
classComment:
Store the comment, aString or Text or RemoteString, associated with the class we are orgainzing. Empty string gets stored only if had a non-empty one before.
classComment:stamp:
Store the comment, aString or Text or RemoteString, associated with the class we are organizing. Empty string gets stored only if had a non-empty one before.
classDefinitions
classTrait
classTrait:
comment
Answer the receiver's comment. (If missing, supply a template)
comment:
Set the receiver's comment to be the argument, aStringOrText.
comment:stamp:
Set the receiver's comment to be the argument, aStringOrText.
commentFollows
Answer a ClassCommentReader that will scan in the comment.
commentStamp:
commentStamp:prior:
Prior source link ignored when filing in.
compile:classified:
Compile the argument, code, as source code in the context of the
receiver and install the result in the receiver's method dictionary under
the classification indicated by the second argument, heading. nil is to be
notified if an error occurs. The argument code is either a string or an
object that converts to a string or a PositionableStream on an object that
converts to a string.
compile:classified:notifying:
compile:classified:withStamp:notifying:
compile:classified:withStamp:notifying:logSource:
compile:notifying:
Refer to the comment in Behavior|compile:notifying:.
compileSilently:classified:
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.
compileSilently:classified:notifying:
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.
copy
copy:from:
Install the method associated with the first argument, sel, a message
selector, found in the method dictionary of the second argument, class,
as one of the receiver's methods. Classify the message under -As yet not
classified-.
copy:from:classified:
Install the method associated with the first arugment, sel, a message
selector, found in the method dictionary of the second argument, class,
as one of the receiver's methods. Classify the message under the third
argument, cat.
copyAll:from:
Install all the methods found in the method dictionary of the second
argument, class, as the receiver's methods. Classify the messages under
-As yet not classified-.
copyAll:from:classified:
Install all the methods found in the method dictionary of the second
argument, class, as the receiver's methods. Classify the messages under
the third argument, cat.
copyAllCategoriesFrom:
Specify that the categories of messages for the receiver include all of
those found in the class, aClass. Install each of the messages found in
these categories into the method dictionary of the receiver, classified
under the appropriate categories.
copyCategory:from:
Specify that one of the categories of messages for the receiver is cat, as
found in the class, class. Copy each message found in this category.
copyCategory:from:classified:
Specify that one of the categories of messages for the receiver is the
third argument, newCat. Copy each message found in the category cat in
class aClass into this new category.
copyMethodDictionaryFrom:
Copy the method dictionary of the donor class over to the receiver
defaultEnvironment
definition
Answer a String that defines the receiver in good old ST-80.
doneCompiling
A ClassBuilder has finished the compilation of the receiver.
This message is a notification for a class that needs to do some
cleanup / reinitialization after it has been recompiled.
environment
environment:
errorCategoryName
fileOutCategory:
fileOutCategory:on:moveSource:toFile:
File a description of the receiver's category, aString, onto aFileStream. If
moveSource, is true, then set the method source pointer to the new file position.
Note when this method is called with moveSource=true, it is condensing the
.sources file, and should only write one preamble per method category.
fileOutChangedMessages:on:
File a description of the messages of the receiver that have been
changed (i.e., are entered into the argument, aSet) onto aFileStream.
fileOutChangedMessages:on:moveSource:toFile:
File a description of the messages of this class that have been
changed (i.e., are entered into the argument, aSet) onto aFileStream. If
moveSource, is true, then set the method source pointer to the new file position.
Note when this method is called with moveSource=true, it is condensing the
.changes file, and should only write a preamble for every method.
fileOutMethod:
Write source code of a single method on a file. Make up a name for the file.
fileOutOn:
File a description of the receiver on aFileStream.
fileOutOn:moveSource:toFile:
File a description of the receiver on aFileStream. If the boolean
argument, moveSource, is true, then set the trailing bytes to the position
of aFileStream and to fileIndex in order to indicate where to find the
source code.
fileOutOn:moveSource:toFile:initializing:
fileOutOrganizationOn:
File a description of the receiver's organization on aFileStream.
hasClassTrait
hasComment
return whether this class truly has a comment other than the default
includesBehavior:
initialize
isBaseTrait
isClassSide
isClassTrait
isInstanceSide
isMeta
isObsolete
isValidTraitName:
localMethods
returns the methods of classes including the ones of the traits that the class uses
methodReferencesInCategory:
methods
returns the methods of classes including the ones of the traits that the class uses
methodsFor:
Answer a ClassCategoryReader for compiling the messages in the category, categoryName, of the receiver.
methodsFor:priorSource:inFile:
Prior source pointer ignored when filing in.
methodsFor:stamp:
methodsFor:stamp:prior:
Prior source link ignored when filing in.
moveChangesTo:
Used in the process of condensing changes, this message requests that
the source code of all methods of the receiver that have been changed
should be moved to newFile.
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
noteAddedSelector:meta:
A hook allowing some classes to react to adding of certain selectors
noteCompilationOf:meta:
A hook allowing some classes to react to recompilation of certain selectors
noteRecategorizedSelector:from:to:
noteRecategorizedSelectors:oldComposition:
notifyOfRecategorizedSelector:from:to:
obsolete
printCategoryChunk:on:
printCategoryChunk:on:priorMethod:
printCategoryChunk:on:withStamp:priorMethod:
Print a method category preamble. This must have a category name.
It may have an author/date stamp, and it may have a prior source link.
If it has a prior source link, it MUST have a stamp, even if it is empty.
printCategoryChunk:withStamp:on:
printMethodChunk:withPreamble:on:moveSource:toFile:
Copy the source code for the method associated with selector onto the fileStream. If moveSource true, then also set the source code pointer of the method.
printOn:
printOnStream:
putClassCommentToCondensedChangesFile:
Called when condensing changes. If the receiver has a class comment, and if that class comment does not reside in the .sources file, then write it to the given filestream, with the resulting RemoteString being reachable from the source file #2. Note that any existing backpointer into the .sources file is lost by this process -- a situation that maybe should be fixed someday.
reformatAll
Reformat all methods in this class.
Leaves old code accessible to version browsing
reformatMethodAt:
removeCategory:
Remove each of the messages categorized under aString in the method
dictionary of the receiver. Then remove the category aString.
removeFromSystem
removeFromSystem:
removeSelector:
Remove the message whose selector is given from the method
dictionary of the receiver, if it is there. Answer nil otherwise.
rename:
reorganize
During fileIn, !Rectangle reorganize! allows Rectangle to seize control and treat the next chunk as its organization. See the transfer of control where ReadWriteStream fileIn calls scanFrom:
requirements
setName:andRegisterInCategory:environment:
storeOn:
Classes and Metaclasses have global names.
updateOrganizationSelector:oldCategory:newCategory:
variablesAndOffsetsDo:
wantsChangeSetLogging
Answer whether code submitted for the receiver should be remembered by the changeSet mechanism. 7/12/96 sw
wantsRecompilationProgressReported
Answer whether the receiver would like progress of its recompilation reported interactively to the user.
whichCategoryIncludesSelector:
Answer the category of the argument, aSelector, in the organization of
the receiver, or answer nil if the receiver does not inlcude this selector.
zapOrganization
Remove the organization of this class by message categories.
This is typically done to save space in small systems. Classes and methods
created or filed in subsequently will, nonetheless, be organized
Trait
Each trait in the system is represented as an instance of me. Like Class, I concretize my superclass by providing instance variables for the name and the environment. Since traits do not define variables, I not provide facilities for pool variables. However, I declare an instance variable to hold the associated classtrait, which is an instance of the class ClassTrait.
applyChangesOfNewTraitCompositionReplacing:
Duplicated on Class
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
Answer the DynamicBinding for the receiver (if any)
classDefinitions
classTrait
classTrait:
Assigns the class trait associated with the receiver.
copy
Answer a copy of the receiver without a list of subclasses.
defaultEnvironment
environment
Return the environment in which the receiver is visible
environment:
fileOutOn:moveSource:toFile:
This is just copied from Class.. the whole fileout is a mess.
fileOutOn:moveSource:toFile:initializing:
File a description of the receiver on aFileStream. If the boolean argument,
moveSource, is true, then set the trailing bytes to the position of aFileStream and
to fileIndex in order to indicate where to find the source code.
hasClassTrait
includesBehavior:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isBaseTrait
isClassTrait
isObsolete
Return true if the receiver is obsolete.
isValidTraitName:
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
name:
name:traitComposition:methodDict:localSelectors:organization:
Used by copy
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
Make the receiver obsolete.
removeFromSystem
removeFromSystem:
rename:
The new name of the receiver is the argument, aString.
requirements
setName:andRegisterInCategory:environment:
variablesAndOffsetsDo:
This is the interface between the compiler and a class's instance or field names. The
class should enumerate aBinaryBlock with the field definitions (with nil offsets) followed
by the instance variable name strings and their integer offsets (1-relative). The order is
important; names evaluated later will override the same names occurring earlier.
TraitAlias
See comment of my superclass TraitTransformation.
-
aliasNamed:ifAbsent:
aliases
Collection of associations where key is the
alias and value the original selector.
aliases:
aliasesForSelector:
Return a collection of alias selectors that are defined in this transformation.
allAliasesDict
Return a dictionary with all alias associations that are defined in this transformation.
allSelectors
assertValidAliasDefinition:
collectMethodsFor:into:
Collect instances of LocatedMethod into methodDescription
for each method that has the selector aSelector and is not excluded
or for which aSelector is an alias.
copy
Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.
copyTraitExpression
isEmpty
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
removeAlias:
with:aliases:
TraitBehavior
I declare the instance variables methodDict, traitComposition and localSelectors that normally would be defined on PureBehavior (see class comment of PureBehavior). Furthermore I keep track of where I am used and I provide compatibility methods to make me useable in tools where originally a class was expected.
addSelectorSilently:withMethod:
addUser:
allClassVarNames
allInstVarNames
allSelectors
allSubclasses
allSubclassesDo:
allSuperclasses
allSuperclassesDo:
basicLocalSelectors
Direct accessor for the instance variable localSelectors.
Since localSelectors is lazily initialized, this may
return nil, which means that all selectors are local.
basicLocalSelectors:
browse
classPool
classVarNames
classesComposedWithMe
forgetDoIts
get rid of old DoIt methods
hasTraitComposition
inheritsFrom:
Used by RB
initialize
Subclasses should redefine this method to perform initializations on instance creation
instSize
instVarNames
isTrait
lookupSelector:
methodDict
methodDict:
poolDictionaryNames
precodeCommentOrInheritedCommentFor:
recompile:from:
Compile the method associated with selector in the receiver's method dictionary.
removeFromTraitCompositionOfUsers
removeSelector:
removeUser:
requiredSelectors
sendCaches
sharedPools
subclassDefinerClass
subclasses
thoroughWhichSelectorsReferTo:special:byte:
Answer a set of selectors whose methods access the argument as a
literal. Dives into the compact literal notation, making it slow but
thorough
traitComposition
traitComposition:
updateRequires
users
whichClassIncludesSelector:
Traits compatibile implementation for:

Answer the class on the receiver's superclass chain where the
argument, aSymbol (a message selector), will be found. Answer nil if none found.
withAllSubclasses
zapAllMethods
Remove all methods in this trait which is assumed to be obsolete
TraitComposition
I hold a collection of trait transformations and provide important facilities to query the trait composition. For each trait in the composition clause there exists exactly one transformation in the collection.
Note, that directly manipulating the composition of a class or trait does not effect changes automatically. Use PureBehavior>>setTraitComposition: to do this. You have to make a copy of the old trait composition before changing it because only the difference between the new and the old composition is updated!
+
-
the modifier operators #@ and #- bind stronger than +.
Thus, #@ or #- sent to a sum will only affect the most right summand
@
the modifier operators #@ and #- bind stronger than +.
Thus, #@ or #- sent to a sum will only affect the most right summand
add:
addCompositionOnLeft:
addOnTheLeft:
allTraits
asTraitComposition
assertValidUser:
Assert that this trait composition set for aBehavior
does not introduce a cycle.
changedSelectorsComparedTo:
copy
Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.
copyTraitExpression
copyWithExclusionOf:to:
copyWithoutAlias:of:
errorIfNotAddable:
includesMethod:
includesTrait:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isAliasSelector:
Return true if the selector aSymbol is an alias defined
in this or in another composition somewhere deeper in
the tree of traits compositions.
isEmpty
isLocalAliasSelector:
Return true if the selector aSymbol is an alias defined
in this composition.
methodDescriptionForSelector:
Return a TraitMethodDescription for the selector aSymbol.
methodDescriptionsForSelector:
Return a collection of TraitMethodDescriptions for aSymbol and all the
aliases of aSymbol.
normalizeTransformations
notEmpty
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
printString
Answer a String whose characters are a description of the receiver.
If you want to print without a character limit, use fullPrintString.
remove:
removeFromComposition:
size
Primitive. Answer the number of indexable variables in the receiver.
This value is the same as the largest legal subscript. Essential. See Object
documentation whatIsAPrimitive.
traitProvidingSelector:
Return the trait which originally provides the method aSymbol or return nil
if trait composition does not provide this selector or there is a conflict.
Take aliases into account. Return the trait which the aliased method is defined in.
traits
transformationOfTrait:
Return the transformation which holds aTrait
or nil if this composition doesn't include aTrait.
transformations
transformations:
with:
with:with:
TraitCompositionException
Signal invalid trait compositions.
TraitDescription
I add a number of facilities (most defined by traits which are also used in ClassDescription):
Category organization for methods
The maintenance of a ChangeSet, and logging changes on a file
Most of the mechanism for fileOut.
Copying of methods to other traits/classes
Operators to create trait compositions
addExclusionOf:
allMethodsInCategory:
Answer a list of all the method categories of the receiver
asCommentNode
baseTrait
browserIcon
browserIcon:selector:
category
category:
classCommentBlank
classSide
classTrait
copy:from:classified:
Install the method associated with the first arugment, sel, a message
selector, found in the method dictionary of the second argument, class,
as one of the receiver's methods. Classify the message under the third
argument, cat.
copyTraitExpression
When recursively copying a trait expression, the primitive traits should NOT be copied
because they are globally named 'well-known' objects
definitionST80
fileOut
Create a file whose name is the name of the receiver with '.st' as the
extension, and file a description of the receiver onto it.
forgetDoIts
get rid of old DoIt methods and bogus entries in the ClassOrganizer.
hasClassTrait
instanceSide
isBaseTrait
isClassTrait
isTestCase
linesOfCode
An approximate measure of lines of code.
Includes comments, but excludes blank lines.
logMethodSource:forMethodWithNode:inCategory:withStamp:notifying:
methodsInCategory:
Answer a list of the methods of the receiver that are in category named aName
notifyOfRecategorizedSelector:from:to:
notifyUsersOfChangedSelectors:
notifyUsersOfRecategorizedSelector:from:to:
numberOfMethods
cound all methods that are local (not comming from a trait)
obsolete
Make the receiver obsolete.
organization
Answer the instance of ClassOrganizer that represents the organization
of the messages of the receiver.
organization:
Install an instance of ClassOrganizer that represents the organization of the messages of the receiver.
printMethodChunk:withPreamble:on:moveSource:toFile:
Copy the source code for the method associated with selector onto the fileStream. If moveSource true, then also set the source code pointer of the method.
spaceUsed
Answer a rough estimate of number of bytes used by this class and its metaclass. Does not include space used by class variables.
theMetaClass
theNonMetaClass
traitVersion
Default. Any class may return a later version to inform readers that use ReferenceStream. 8/17/96 tk
variablesAndOffsetsDo:
version
Allows polymoprhism with ClassDescription>>version
TraitException
General exception used for example to signal invalid trait compositions
TraitExclusion
See comment of my superclass TraitTransformation.
addExclusionOf:
allSelectors
collectMethodsFor:into:
Collect instances of LocatedMethod into methodDescription
for each method that has the selector aSelector and is not excluded
or for which aSelector is an alias.
copy
Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.
copyTraitExpression
exclusions
exclusions:
isEmpty
methodReferencesInCategory:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
with:exclusions:
TraitMethodDescription
Used by TraitComposition to encapsulates a collection of methods for one particular selector when querying for changes. According to the number and kind of those methods a provided method exists, there is a conflict or there are no provided nor conflicting methods at all. I provide the interface to query for those situations, e.g., effectiveMethod returns the provided method or the conflict marker method.
addLocatedMethod:
conflictMethod
effectiveMethod
Return the effective compiled method of this method description.
effectiveMethodCategory
effectiveMethodCategoryCurrent:new:
generateMethod:withMarker:forArgs:binary:
getArgumentNames
initialize
Subclasses should redefine this method to perform initializations on instance creation
isAliasSelector
Return true if the selector is an alias (if it is different
from the original selector) or already an aliased method
in the original location (recursively search the compositions).
Return false, if not or if we have a conflict.
isBinarySelector
isConflict
isEmpty
isLocalAliasSelector
Return true if the selector is an alias (if it is different
from the original selector). Return false, if not or if we
have a conflict.
isProvided
isRequired
locatedMethods
maxArguments
methodsDo:
new
providedLocatedMethod
providedMethod
requiredMethod
selector
selector:
size
Primitive. Answer the number of indexable variables in the receiver.
This value is the same as the largest legal subscript. Essential. See Object
documentation whatIsAPrimitive.
TraitTransformation
A trait transformation is an instance of one of my concrete subclasses, TraitAlias or TraitExclusion. These represent a transformation of a trait, specified by the alias and exclusion operators.
I define an instance variable named subject which holds the object that is transformed. Thus, an alias transformation has as its subject a trait, and a trait exclusion has as its subject either a trait alias or a trait. Each of the concrete transformation classes implement the method allSelectors according to the transformation it represents.
(There was formerly a subclass called TraitHolder, which was the identity transformation and which did not modify the trait. This was clearly redundant, and was removed.)
-
@
addExclusionOf:
aliasesForSelector:
Return a collection of alias selectors that are defined in this transformation.
allAliasesDict
Return a dictionary with all alias associations that are defined in this transformation.
allSelectors
changedSelectorsComparedTo:
collectMethodsFor:into:
Collect instances of LocatedMethod into methodDescription
for each method that has the selector aSelector and is not excluded
or for which aSelector is an alias.
copy
Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.
copyTraitExpression
isEmpty
isMeta
normalized
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
removeAlias:
selectors
sourceCodeTemplate
subject
subject:
theNonMetaClass
trait
traitTransformations