# Object

Object has no superclass. and defines no instance variables. It has many subclasses (not listed here).

Object is the superclass of all (non-root) classes. It implements operations common to all types of objects. If you create a new root class, you should reimplement many of the selectors implemented here. However, the only selector that is absolutely required to be implemented is #doesNotUnderstand: (this requirement is enforced by the compiler).
Note that many messages here, such as #==, are implemented only for the benefit of #perform:, since they are inlined by the compiler.

## Methods defined in Object:

### Methods for accessing:

- at: index
- at: index put: value
- basicAt: index
- basicAt: index put: value
- basicSize
  Answer the number of indexed slots in the receiver.
- class
- instVarAt: index
- instVarAt: index put: value
- size
  Answer the number of slots in the receiver.
- yourself

### Methods for comparing:

- ~~ object
- ~= object
- = object
- == object
- hash
- identityHash
  It's just the object table entry of the receiver converted to a SmallInteger.

### Methods for copying:

- copy
- postCopy
- shallowCopy

### Methods for dependents:

- update: aspect
- update: aspect with: parameter
- update: aspect with: parameter from: object

### Methods for error handling:

- badTrapArgument: systrapNumber
- basicError: message
- doesNotUnderstand: message
- error
- error: info
- halt
- mustBeBoolean
- primitiveFailed
- shouldNotImplement
- subclassResponsibility

### Methods for predicates:

- isBytes
- isKindOf: class
  Implemented as follows:
  | probe |
  probe := self class.
  [probe isNil] whileFalse: [
  probe == class ifTrue: [^true].
  probe := probe superclass].
  ^false.
- isMemberOf: class
- isNil
  Usually inlined by the compiler.
- notNil
- respondsTo: selector

### Methods for printing:

- displayOn: stream
- displayString
- printOn: stream
- printString

### Methods for system operations:

- asOOP
- basicChangeClassTo: newClass
- become: other
- orIfNil: block
- perform: selector
- perform: selector with: argument
- perform: selector with: argument with: argument2
- perform: selector with: argument with: argument2 with: argument3
- perform: selector withArguments: array

Pocket Smalltalk Documentation