|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.simpleframework.xml.convert.Registry
public class Registry
The Registry
represents an object that is used to
register bindings between a class and a converter implementation.
Converter instances created by this registry are lazily created
and cached so that they are instantiated only once. This ensures
that the overhead of serialization is reduced.
RegistryStrategy
Constructor Summary | |
---|---|
Registry()
Constructor for the Registry object. |
Method Summary | |
---|---|
Registry |
bind(java.lang.Class type,
java.lang.Class converter)
This is used to register a binding between a type and the converter used to serialize and deserialize it. |
Registry |
bind(java.lang.Class type,
Converter converter)
This is used to register a binding between a type and the converter used to serialize and deserialize it. |
Converter |
lookup(java.lang.Class type)
This is used to acquire a Converter instance from
the registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Registry()
Registry
object. This is used
to create a registry between classes and the converters that
should be used to serialize and deserialize the instances. All
converters are instantiated once and cached for reuse.
Method Detail |
---|
public Converter lookup(java.lang.Class type) throws java.lang.Exception
Converter
instance from
the registry. All instances are cache to reduce the overhead
of lookups during the serialization process. Converters are
lazily instantiated and so are only created if demanded.
type
- this is the type to find the converter for
java.lang.Exception
public Registry bind(java.lang.Class type, java.lang.Class converter) throws java.lang.Exception
type
- this is the object type to bind to a converterconverter
- this is the converter class to be used
java.lang.Exception
public Registry bind(java.lang.Class type, Converter converter) throws java.lang.Exception
type
- this is the object type to bind to a converterconverter
- this is the converter instance to be used
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |