|
Class: ProtoObject
nil
|
+--ProtoObject
This class inherits NOTHING - most messages will lead into doesNotUnderstand:
|
+--DelayedValue
|
+--Lazy
|
+--LazyValue
- Package:
- stx:libbasic
- Category:
- Kernel-Objects
- Version:
- rev:
1.36
date: 2019/06/25 15:30:00
- user: cg
- file: ProtoObject.st directory: libbasic
- module: stx stc-classLibrary: libbasic
- Author:
- Claus Gittinger (not much authoring, though)
a minimum object without much protocol;
Provides the minimum required to prevent inspectors from crashing,
and debuggers from blocking.
(i.e. instead of inheriting from nil, better inherit from this).
Named after a similar class found in Dolphin-Smalltalk.
helpers
-
shallowCopyOf: anObject
-
return a copy of anObject with shared subobjects (a shallow copy)
i.e. the copy shares referenced instvars with its original.
error handling
-
doesNotUnderstand: aMessage
-
this message is sent by the runtime system (VM) when
a message is not understood by some object (i.e. there
is no method for that selector). The original message has
been packed into aMessage (i.e. the receiver, selector and
any arguments) and the original receiver is then sent the
#doesNotUnderstand: message.
Here, we raise another signal which usually enters the debugger.
You can of course redefine #doesNotUnderstand: in your classes
to implement message delegation,
or handle the MessageNotUnderstood exception gracefully.
inspecting
-
basicInspect
-
this method is required to allow inspection of the object
-
inspect
-
launch an inspector on the receiver.
this method (or better: inspectorClass) can be redefined in subclasses
to start special inspectors.
usage example(s):
launch an inspector on the receiver.
this method (or better: inspectorClass) can be redefined in subclasses
to start special inspectors.
|
usage example(s):
-
inspectorClass
-
-
inspectorLabelInWindowTitle ( an extension from the stx:libtool package )
-
what is the inspector showing for me in the title.
Moved out of he inspector to allow redefinition for eg. remote objects
-
inspectorValueListIconFor: anInspector ( an extension from the stx:libtool package )
-
returns the icon to be shown alongside the value list of an inspector
-
instVarAt: index
-
this method is required to allow inspection of the object
-
isKindOf: aBehavior
-
this method is required Behavior>>#allSubInstancesDo:
-
perform: aSelector
-
this method is required to allow inspection of the object
-
perform: aSelector with: arg1
-
this method is required to allow inspection of the object
-
perform: aSelector with: arg1 with: arg2
-
this method is required to allow inspection of the object
-
perform: aSelector with: arg1 with: arg2 with: arg3
-
this method is required to allow inspection of the object
-
perform: aSelector with: arg1 with: arg2 with: arg3 with: arg4
-
this method is required to allow inspection of the object
-
perform: aSelector with: arg1 with: arg2 with: arg3 with: arg4 with: arg5
-
this method is required to allow inspection of the object
-
perform: aSelector with: arg1 with: arg2 with: arg3 with: arg4 with: arg5 with: arg6
-
this method is required to allow inspection of the object
-
perform: aSelector withArguments: argArray
-
send the message aSelector with all args taken from argArray
to the receiver.
1-to-1 Copy from the same method in Object!
-
referencesAny: anObject
-
this method is required to allow inspection of the object
-
referencesInstanceOf: anObject
-
this method is required to allow inspection of the object
-
referencesObject: anObject
-
this method is required to allow inspection of the object
queries
-
basicSize
-
this method is required to allow restore of the object
-
class
-
return the receiver's class
-
identityHash
-
return an Integer useful as a hash key for the receiver.
This hash should return same values for the same object (i.e. use
this to hash on identity of objects).
We cannot use the Objects address (as other smalltalks do) since
no object-table exists and the hashval must not change when objects
are moved by the collector. Therefore we assign each object a unique
Id in the object header itself as its hashed upon.
(luckily we have 11 bits spare to do this - unluckily its only 11 bits).
Time will show, if 11 bits are enough; if not, another entry in the
object header will be needed, adding 4 bytes to every object. Alternatively,
hashed-upon objects could add an instvar containing the hash value.
testing
-
ifNil: aBlock
-
-
ifNotNil: aBlockOrValue
-
-
isBehavior
-
return true, if the receiver is describing another object's behavior.
False is returned here - the method is only redefined in Behavior.
-
isBlock
-
-
isBridgeProxy
-
answer true, if I am a proxy object for a bridged remote object
-
isException
-
-
isExceptionHandler
-
-
isJavaObject
-
return true if this is a JavaObject.
false is returned here - the method is only redefined in JavaObject.
-
isLazyValue
-
-
isLiteral
-
-
isNil
-
-
isProtoObject
-
-
isProxy
-
answer true, if I am a proxy for another (lazy loaded) object
visiting
-
acceptVisitor: aVisitor with: aParameter
-
double-dispatch via visitObject:with: into a Visitor.
Subclasses redefine this to pass their type in the message name (i.e. visitXXX:)
|