public class DefaultDOMFactory extends JavaPrimitivesDOMFactory
DefaultDOMFactory
can be used to serialize DOMStorable objects
in a DOM with the use of a mapping between Java class names and DOM element
names.Constructor and Description |
---|
DefaultDOMFactory()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addEnum(java.lang.String value,
java.lang.Enum e)
Adds an Enum value to the DOMFactory.
|
void |
addEnumClass(java.lang.String name,
java.lang.Class c)
Adds an Enum class to the DOMFactory.
|
void |
addStorable(java.lang.String name,
DOMStorable prototype)
Adds a DOMStorable prototype to the DOMFactory.
|
void |
addStorableClass(java.lang.String name,
java.lang.Class c)
Adds a DOMStorable class to the DOMFactory.
|
java.lang.Object |
create(java.lang.String name)
Creates a DOMStorable object.
|
protected java.lang.Enum |
createEnum(java.lang.String name,
java.lang.String value) |
protected java.lang.String |
getEnumName(java.lang.Enum e) |
protected java.lang.String |
getEnumValue(java.lang.Enum e) |
java.lang.String |
getName(java.lang.Object o)
Returns the element name for the specified object.
|
read, write
public void addStorableClass(java.lang.String name, java.lang.Class c)
public void addStorable(java.lang.String name, DOMStorable prototype)
public void addEnumClass(java.lang.String name, java.lang.Class c)
public void addEnum(java.lang.String value, java.lang.Enum e)
public java.lang.Object create(java.lang.String name)
create
in interface DOMFactory
create
in class JavaPrimitivesDOMFactory
public java.lang.String getName(java.lang.Object o)
DOMFactory
getName
in interface DOMFactory
getName
in class JavaPrimitivesDOMFactory
protected java.lang.String getEnumName(java.lang.Enum e)
getEnumName
in class JavaPrimitivesDOMFactory
protected java.lang.String getEnumValue(java.lang.Enum e)
getEnumValue
in class JavaPrimitivesDOMFactory
protected java.lang.Enum createEnum(java.lang.String name, java.lang.String value)
createEnum
in class JavaPrimitivesDOMFactory