|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XmlBuilder
An XmlBuilder is an interface that can be implemented by classes that convert between XmlElements and some internal data representation. The main reason for doing so is to allow other builders to "reuse" parts of an XML DTD. For example, we could have a builder that builds Java2D objects, such as "line" and "polygon". Then some other builder, that for example builds libraries of graphical icons, can use an instance of the Java2D builder internally -- if it does not recognize the type of an XML element, it calls the Java2D builder to see if it can get a low-level graphical object.
Red |
Method Summary | |
---|---|
java.lang.Object |
build(XmlElement elt,
java.lang.String type)
Given an XmlElement, create and return an internal representation of it. |
XmlElement |
generate(java.lang.Object obj)
Given an object, produce an XML representation of it. |
void |
setDelegate(XmlBuilder child)
Delegate builders can be used to build/generate for objects that are unknown by the current builder, as might be the case in a hierarchy of heterogeneous objects. |
Method Detail |
---|
java.lang.Object build(XmlElement elt, java.lang.String type) throws java.lang.Exception
public Graph build (XmlELement elt, String type);
java.lang.Exception
void setDelegate(XmlBuilder child)
CompositeBuilder
XmlElement generate(java.lang.Object obj) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |