Category: Language-Implementation
Superclass: Object
I have the questionable distinction of being a class with only one instance, which is the object "nil".

Method category index

still unclassified (class)
basic (instance)
class creation - alternative (instance)
class polymorphism (instance)
CObject interoperability (instance)
dependents access (instance)
iteration (instance)
printing (instance)
still unclassified (instance)
storing (instance)
testing (instance)

still unclassified (class)

allSharedPoolDictionariesDo: aBlock
Answer the shared pools visible from methods in the metaclass, in the correct search order.

top


basic (instance)

copy
Answer the receiver.

deepCopy

Answer the receiver.

shallowCopy

Answer the receiver.

top


class creation - alternative (instance)

subclass: classNameString classInstanceVariableNames: stringClassInstVarNames instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames
Don't use this, it is only present to file in from IBM Smalltalk

subclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames

Don't use this, it is only present to file in from IBM Smalltalk

variableByteSubclass: classNameString classInstanceVariableNames: stringClassInstVarNames instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames

Don't use this, it is only present to file in from IBM Smalltalk

variableByteSubclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames

Don't use this, it is only present to file in from IBM Smalltalk

variableLongSubclass: classNameString classInstanceVariableNames: stringClassInstVarNames instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames

Don't use this, it is only present to file in from IBM Smalltalk

variableLongSubclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames

Don't use this, it is only present to file in from IBM Smalltalk

variableSubclass: classNameString classInstanceVariableNames: stringClassInstVarNames instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames

Don't use this, it is only present to file in from IBM Smalltalk

variableSubclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames

Don't use this, it is only present to file in from IBM Smalltalk

top


class polymorphism (instance)

allSubclasses
Return all the classes in the system.

instSize

Answer `0'.

metaclassFor: classNameString

Create a Metaclass object for the given class name. The metaclass is a subclass of Class

methodDictionary

Answer `nil'.

removeSubclass: aClass

Ignored -- necessary to support disjoint class hierarchies

subclass: classNameString

Define a subclass of the receiver with the given name. If the class is already defined, don't modify its instance or class variables but still, if necessary, recompile everything needed.

subclass: classNameString environment: aNamespace

Define a subclass of the receiver with the given name within aNamespace. If the class is already defined, don't modify its instance or class variables but still, if necessary, recompile everything needed.

subclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames category: categoryNameString

Define a fixed subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.

variable: shape subclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames category: categoryNameString

Define a variable subclass of the receiver with the given name, shape, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed. The shape can be one of #byte #int8 #character #short #ushort #int #uint #int64 #uint64 #utf32 #float #double or #pointer.

variableByteSubclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames category: categoryNameString

Define a byte variable subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.

variableSubclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames category: categoryNameString

Define a variable pointer subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.

variableWordSubclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames category: categoryNameString

Define a word variable subclass of the receiver with the given name, instance variables, class variables, pool dictionaries and category. If the class is already defined, if necessary, recompile everything needed.

top


CObject interoperability (instance)

free
Do nothing, a NULL pointer can be safely freed.

narrow

Return the receiver: a NULL pointer is always nil, whatever its type.

top


dependents access (instance)

addDependent: ignored
Fail, nil does not support dependents.

release

Ignore this call, nil does not support dependents.

top


iteration (instance)

ifNil: nilBlock ifNotNilDo: iterableBlock
Evaluate nilBlock if the receiver is nil, else evaluate iterableBlock with each element of the receiver (which should be an Iterable).

ifNotNilDo: iterableBlock

Evaluate iterableBlock with each element of the receiver (which should be an Iterable) if not nil. Else answer nil

ifNotNilDo: iterableBlock ifNil: nilBlock

Evaluate nilBlock if the receiver is nil, else evaluate iterableBlock, passing each element of the receiver (which should be an Iterable).

top


printing (instance)

printOn: aStream
Print a representation of the receiver on aStream.

printOn: aStream in: aNamespace

Print on aStream a representation of the receiver as it would be accessed from aNamespace: nil is the same everywhere, so print the same as #printOn:

top


still unclassified (instance)

inheritsFrom: aClass
Always return false, as nil inherits from nothing.

top


storing (instance)

isLiteralObject
Answer whether the receiver is expressible as a Smalltalk literal.

storeLiteralOn: aStream

Store on aStream some Smalltalk code which compiles to the receiver

storeOn: aStream

Store Smalltalk code compiling to the receiver on aStream.

top


testing (instance)

ifNil: nilBlock
Evaluate nilBlock if the receiver is nil, else answer nil

ifNil: nilBlock ifNotNil: notNilBlock

Evaluate nilBlock if the receiver is nil, else evaluate notNilBlock, passing the receiver.

ifNotNil: notNilBlock

Evaluate notNilBlock if the receiver is not nil, passing the receiver. Else answer nil

ifNotNil: notNilBlock ifNil: nilBlock

Evaluate nilBlock if the receiver is nil, else evaluate notNilBlock, passing the receiver.

isNil

Answer whether the receiver is the undefined object nil. Always answer true.

isNull

Answer whether the receiver represents a NULL C pointer. Always answer true.

notNil

Answer whether the receiver is not the undefined object nil. Always answer false.

top