Download GemStone/S Programming Guide

Transcript
Chapter
13
Advanced Class
Protocol
A class responds to messages defined and stored by its class and its class’s
superclasses. The classes named Object, Class, and Behavior are superclasses of
every class. Although the mechanism involved may be a little confusing, the
practical implication is easy to grasp — every class understands the instance
messages defined by Object, Class, and Behavior.
You’re already familiar with Object’s protocol, that enables a class to represent
itself as a string, to return the segment it occupies. The class named Class defines
the familiar subclass creation message (subclass:instVarNames:...) and
some protocol for adding and removing class variables and pool dictionaries.
Class Behavior defines by far the largest number of useful messages that you may
not yet have encountered. This chapter presents a brief overview of Behavior’s
methods.
Adding and Removing Methods
describes the protocol in class Behavior for adding and removing methods.
Examining a Class’s Method Dictionary
describes the protocol in class Behavior for examining the method dictionary
of a class.
December 2001
GemStone Systems, Inc.
13-1