eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ProtoObject':

Home

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

Class: ProtoObject


Inheritance:

   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)

Description:


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.


Class protocol:

helpers
o  shallowCopyOf: anObject
return a copy of anObject with shared subobjects (a shallow copy)
i.e. the copy shares referenced instvars with its original.


Instance protocol:

error handling
o  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
o  basicInspect
this method is required to allow inspection of the object

o  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):

     ProtoObject new inspect

o  inspectorClass

o  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

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

o  instVarAt: index
this method is required to allow inspection of the object

o  isKindOf: aBehavior
this method is required Behavior>>#allSubInstancesDo:

o  perform: aSelector
this method is required to allow inspection of the object

o  perform: aSelector with: arg1
this method is required to allow inspection of the object

o  perform: aSelector with: arg1 with: arg2
this method is required to allow inspection of the object

o  perform: aSelector with: arg1 with: arg2 with: arg3
this method is required to allow inspection of the object

o  perform: aSelector with: arg1 with: arg2 with: arg3 with: arg4
this method is required to allow inspection of the object

o  perform: aSelector with: arg1 with: arg2 with: arg3 with: arg4 with: arg5
this method is required to allow inspection of the object

o  perform: aSelector with: arg1 with: arg2 with: arg3 with: arg4 with: arg5 with: arg6
this method is required to allow inspection of the object

o  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!

o  referencesAny: anObject
this method is required to allow inspection of the object

o  referencesInstanceOf: anObject
this method is required to allow inspection of the object

o  referencesObject: anObject
this method is required to allow inspection of the object

queries
o  basicSize
this method is required to allow restore of the object

o  class
return the receiver's class

o  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
o  ifNil: aBlock

o  ifNotNil: aBlockOrValue

o  isBehavior
return true, if the receiver is describing another object's behavior.
False is returned here - the method is only redefined in Behavior.

o  isBlock

o  isBridgeProxy
answer true, if I am a proxy object for a bridged remote object

o  isException

o  isExceptionHandler

o  isJavaObject
return true if this is a JavaObject.
false is returned here - the method is only redefined in JavaObject.

o  isLazyValue

o  isLiteral

o  isNil

o  isProtoObject

o  isProxy
answer true, if I am a proxy for another (lazy loaded) object

visiting
o  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:)



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 28 Mar 2024 08:58:30 GMT