Squeak Class Documentation category index | class index  
 
Class
  category: Kernel-Classes
  superclass: ClassDescription
  subclasses: ObjectTracer class PseudoContext class ProtoObject class

I add a number of facilities to those in ClassDescription:
A set of all my subclasses (defined in ClassDescription, but only used here and below)
A name by which I can be found in a SystemDictionary
A classPool for class variables shared between this class and its metaclass
A list of sharedPools which probably should be supplanted by some better mechanism.

My instances describe the representation and behavior of objects. I add more comprehensive programming support facilities to the basic attributes of Behavior and the descriptive facilities of ClassDescription.

The slot 'subclasses' is a redundant structure. It is never used during execution, but is used by the development system to simplify or speed certain operations.

instance methods
  Camp Smalltalk
  sunitName

  accessing
  classPool
name

  accessing class hierarchy
  addSubclass:
removeSubclass:
subclasses
subclassesDo:
subclassesDoGently:

  class name
  externalName
nameForViewer
rename:
uniqueNameForReference

  class variables
  addClassVarName:
allClassVarNames
classVarNames
ensureClassPool
initialize
removeClassVarName:

  compiling
  canFindWithoutEnvironment:
compileAll
compileAllFrom:
possibleVariablesFor:continuedFrom:
scopeHas:ifTrue:

  copying
  copy

  fileIn/Out
  fileOut
fileOutAsHtml:
fileOutInitializerOn:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
fileOutPool:onFileStream:
fileOutSharedPoolsOn:
objectForDataStream:
reformatAll
removeFromChanges
shouldFileOutPool:
shouldFileOutPools
storeDataOn:

  initialize-release
  declare:
obsolete
removeFromSystem
removeFromSystem:
removeFromSystemUnlogged
sharing:
superclass:methodDict:format:name:organization:instVarNames:classPool:sharedPools:
superclass:methodDictionary:format:

  instance variables
  addInstVarName:
removeInstVarName:

  organization
  environment
environment:

  pool variables
  addSharedPool:
allSharedPools
removeSharedPool:
sharedPools

  private
  setName:

  subclass creation
  newSubclass
subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:
variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:
variableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:
variableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:
weakSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:

  testing
  hasMethods
isObsolete
isSystemDefined
officialClass

class methods
  fileIn/Out
  fileOutPool:

  instance creation
  template:
templateForSubclassOf:category:

instance methods
  Camp Smalltalk top  
 

sunitName


  accessing top  
 

classPool

Answer the dictionary of class variables.


 

name

Answer the name of the receiver.


  accessing class hierarchy top  
 

addSubclass:

Make the argument, aSubclass, be one of the subclasses of the receiver.
Create an error notification if the argument's superclass is not the receiver.


 

removeSubclass:

If the argument, aSubclass, is one of the receiver's subclasses, remove it.


 

subclasses

Answer a Set containing the receiver's subclasses.


 

subclassesDo:

Evaluate the argument, aBlock, for each of the receiver's immediate subclasses.


 

subclassesDoGently:

Evaluate the argument, aBlock, for each of the receiver's immediate subclasses.


  class name top  
 

externalName

Answer a name by which the receiver can be known.


 

nameForViewer

Answer the name to be shown in the header of a viewer looking at the receiver


 

rename:

The new name of the receiver is the argument, aString.


 

uniqueNameForReference

Answer a unique name by which the receiver can be referred to from user scripts, for example


  class variables top  
 

addClassVarName:

Add the argument, aString, as a class variable of the receiver.
Signal an error if the first character of aString is not capitalized,
or if it is already a variable named in the class.


 

allClassVarNames

Answer a Set of the names of the receiver's class variables, including those
defined in the superclasses of the receiver.


 

classVarNames

Answer a Set of the names of the class variables defined in the receiver.


 

ensureClassPool


 

initialize

Typically used for the initialization of class variables and metaclass
instance variables. Does nothing, but may be overridden in Metaclasses.


 

removeClassVarName:

Remove the class variable whose name is the argument, aString, from
the names defined in the receiver, a class. Create an error notification if
aString is not a class variable or if it is still being used in the code of
the class.


  compiling top  
 

canFindWithoutEnvironment:

This method is used for analysis of system structure -- see senders.


 

compileAll


 

compileAllFrom:

Recompile all the methods in the receiver's method dictionary (not the
subclasses). Also recompile the methods in the metaclass.


 

possibleVariablesFor:continuedFrom:


 

scopeHas:ifTrue:

Look up the first argument, varName, in the context of the receiver. If it is there,
pass the association to the second argument, assocBlock, and answer true.


  copying top  
 

copy

Answer a copy of the receiver without a list of subclasses.


  fileIn/Out top  
 

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.


 

fileOutAsHtml:

File a description of the receiver onto a new file whose base name is the name of the receiver.


 

fileOutInitializerOn:


 

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:

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.


 

fileOutPool:onFileStream:


 

fileOutSharedPoolsOn:

file out the shared pools of this class after prompting the user about each pool


 

objectForDataStream:

I am about to be written on an object file. Write a reference to a class in Smalltalk instead.


 

reformatAll

Reformat all methods in this class.
Leaves old code accessible to version browsing


 

removeFromChanges

References to the receiver, a class, and its metaclass should no longer be included in the system ChangeSet.
7/18/96 sw: call removeClassAndMetaClassChanges:


 

shouldFileOutPool:

respond with true if the user wants to file out aPoolName


 

shouldFileOutPools

respond with true if the user wants to file out the shared pools


 

storeDataOn:

I don't get stored. Use a DiskProxy


  initialize-release top  
 

declare:

Declare class variables common to all instances. Answer whether
recompilation is advisable.


 

obsolete

Change the receiver and all of its subclasses to an obsolete class.


 

removeFromSystem

Forget the receiver from the Smalltalk global dictionary. Any existing
instances will refer to an obsolete version of the receiver.


 

removeFromSystem:

Forget the receiver from the Smalltalk global dictionary. Any existing
instances will refer to an obsolete version of the receiver.


 

removeFromSystemUnlogged

Forget the receiver from the Smalltalk global dictionary. Any existing instances will refer to an obsolete version of the receiver. Do not log the removal either to the current change set nor to the system changes log


 

sharing:

Set up sharedPools. Answer whether recompilation is advisable.


 

superclass:methodDict:format:name:organization:instVarNames:classPool:sharedPools:

Answer an instance of me, a new class, using the arguments of the
message as the needed information.
Must only be sent to a new instance; else we would need Object flushCache.


 

superclass:methodDictionary:format:

Basic initialization of the receiver


  instance variables top  
 

addInstVarName:

Add the argument, aString, as one of the receiver's instance variables.


 

removeInstVarName:

Remove the argument, aString, as one of the receiver's instance variables.


  organization top  
 

environment

Return the environment in which the receiver is visible


 

environment:


  pool variables top  
 

addSharedPool:

Add the argument, aDictionary, as one of the receiver's pool dictionaries.
Create an error if the dictionary is already one of the pools.


 

allSharedPools

Answer a Set of the pools the receiver shares, including those defined
in the superclasses of the receiver.


 

removeSharedPool:

Remove the pool dictionary, aDictionary, as one of the receiver's pool
dictionaries. Create an error notification if the dictionary is not one of
the pools.
: Note that it removes the wrong one if there are two empty Dictionaries in the list.


 

sharedPools

Answer a Set of the pool dictionaries declared in the receiver.


  private top  
 

setName:

Private - set the name of the class


  subclass creation top  
 

newSubclass


 

subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:

This is the standard initialization message for creating a new class as a
subclass of an existing class (the receiver).


 

variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:

This is the standard initialization message for creating a new class as a
subclass of an existing class (the receiver) in which the subclass is to
have indexable byte-sized nonpointer variables.


 

variableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:

This is the standard initialization message for creating a new class as a
subclass of an existing class (the receiver) in which the subclass is to
have indexable pointer variables.


 

variableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:

This is the standard initialization message for creating a new class as a
subclass of an existing class (the receiver) in which the subclass is to
have indexable word-sized nonpointer variables.


 

weakSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:

This is the standard initialization message for creating a new class as a
subclass of an existing class (the receiver) in which the subclass is to
have weak indexable pointer variables.


  testing top  
 

hasMethods

Answer a Boolean according to whether any methods are defined for the
receiver (includes whether there are methods defined in the receiver's
metaclass).


 

isObsolete

Return true if the receiver is obsolete.


 

isSystemDefined

Answer true if the receiver is a system-defined class, and not a UniClass (an instance-specific lightweight class)


 

officialClass

I am not a UniClass. (See Player officialClass). Return the class you use to make new subclasses.


class methods
  fileIn/Out top  
 

fileOutPool:

file out the global pool named aString


  instance creation top  
 

template:

Answer an expression that can be edited and evaluated in order to define a new class.


 

templateForSubclassOf:category:

Answer an expression that can be edited and evaluated in order to define a new class, given that the class previously looked at was as given