Modifier and Type | Class and Description |
---|---|
static interface |
XMLBinder.CustomConverter
Sometimes you need to use a CustomConverter rather than a .java2xml
file i.e. when the class is from a third party (e.g. a Swing class) and you
can't add a .java2xml file to the jar.
|
protected static interface |
XMLBinder.SpecVisitor |
static class |
XMLBinder.XMLBinderException |
Constructor and Description |
---|
XMLBinder() |
Modifier and Type | Method and Description |
---|---|
void |
addCustomConverter(java.lang.Class c,
XMLBinder.CustomConverter converter) |
protected java.lang.Class |
fieldClass(java.lang.reflect.Method setter) |
protected boolean |
hasCustomConverter(java.lang.Class fieldClass) |
java.lang.reflect.Method |
setter(java.lang.Class c,
java.lang.String field) |
protected java.util.List |
specElements(java.lang.Class c) |
protected boolean |
specifyingTypeExplicitly(java.lang.Class c) |
java.lang.Object |
toJava(java.lang.String text,
java.lang.Class c) |
protected java.lang.String |
toXML(java.lang.Object object) |
protected void |
visit(java.util.List specElements,
XMLBinder.SpecVisitor visitor,
java.lang.Class c) |
protected java.util.List specElements(java.lang.Class c) throws XMLBinder.XMLBinderException, org.jdom.JDOMException, java.io.IOException
XMLBinder.XMLBinderException
org.jdom.JDOMException
java.io.IOException
public void addCustomConverter(java.lang.Class c, XMLBinder.CustomConverter converter)
protected void visit(java.util.List specElements, XMLBinder.SpecVisitor visitor, java.lang.Class c) throws java.lang.Exception
c
- for error messagesjava.lang.Exception
public java.lang.Object toJava(java.lang.String text, java.lang.Class c)
protected boolean specifyingTypeExplicitly(java.lang.Class c) throws XMLBinder.XMLBinderException
XMLBinder.XMLBinderException
protected java.lang.Class fieldClass(java.lang.reflect.Method setter)
public java.lang.reflect.Method setter(java.lang.Class c, java.lang.String field) throws XMLBinder.XMLBinderException
XMLBinder.XMLBinderException
protected java.lang.String toXML(java.lang.Object object)
protected boolean hasCustomConverter(java.lang.Class fieldClass)