PATH |
NSCoding.Support
- Inherits from:
- Object
- Package:
- com.webobjects.foundation
Class Description
NSCoding.Support is an abstract class that defines a mechanism for one class to provide NSCoding behavior on behalf of another class. Subclasses of NSCoding.Support encode and decode objects of a different class. Subclasses of NSCoding.Support are needed to provide coding for classes whose code you don't own and that don't implement NSCoding.
For example, consider Java Client WebObjects applications that use NSCoding to distribute objects between client and server. Not all objects that Java Client distributes implement NSCoding (java.lang.String, for example). To encode and decode non-NSCoding objects, Java Client uses specialized subclasses of NSCoding.Support.
Note: Java Client has private subclasses of NSCoding.Support to encode and decode objects basic Java value classes such as java.lang.String, java.lang.Number, java.math.BigDecimal, and java.util.Date. |
A subclass of NSCoding.Support should implement the methods encodeWithCoder and decodeObject to encode and decode objects of a specific non-NSCoding class. NSCoding.Support's implementations of these methods do nothing.
NSCoding.Support manages a registry of Support classes for classes that don't implement NSCoding. Use the methods setSupportForClass and supportForClass to register and access the NSCoding.Support classes for performing coding on non-NSCoding objects.
Constructors
NSCoding.Support
public NSCoding.Support()
Static Methods
setSupportForClass
public static void setSupportForClass( NSCoding.Support supportClass, Class aClass)
supportForClass
public static NSCoding.Support supportForClass(Class aClass)
Instance Methods
classForCoder
public Class classForCoder(Object anObject)
See Also: classForCoder ( NSCoding)
decodeObject
public abstract Object decodeObject(NSCoder aCoder)
See Also: The NSCoding class description
encodeWithCoder
public abstract void encodeWithCoder( Object anObject, NSCoder aCoder)
See Also: encodeWithCoder ( NSCoding)
© 2001 Apple Computer, Inc. (Last Published April 17, 2001)