Class XMLBinder
- java.lang.Object
-
- com.vividsolutions.jump.util.java2xml.XMLBinder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceXMLBinder.CustomConverterSometimes you need to use a CustomConverter rather than a .java2xml file i.e.protected static interfaceXMLBinder.SpecVisitorstatic classXMLBinder.XMLBinderException
-
Constructor Summary
Constructors Constructor Description XMLBinder()Initialize an XMLBinder and register CustomConverters for current classes like Class, Color, Date, Font...
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCustomConverter(Class<?> c, XMLBinder.CustomConverter converter)protected Class<?>fieldClass(Method setter)protected booleanhasCustomConverter(Class<?> fieldClass)Methodsetter(Class<?> c, String field)protected List<org.jdom2.Element>specElements(Class<?> c)Return the List of XML Elements to be used to serialize a Class.protected booleanspecifyingTypeExplicitly(Class<?> c)ObjecttoJava(String text, Class<?> c)protected StringtoXML(Object object)protected voidvisit(List<org.jdom2.Element> specElements, XMLBinder.SpecVisitor visitor, Class<?> c)
-
-
-
Method Detail
-
specElements
protected List<org.jdom2.Element> specElements(Class<?> c) throws XMLBinder.XMLBinderException, org.jdom2.JDOMException, IOException
Return the List of XML Elements to be used to serialize a Class.- Throws:
XMLBinder.XMLBinderExceptionorg.jdom2.JDOMExceptionIOException
-
addCustomConverter
public void addCustomConverter(Class<?> c, XMLBinder.CustomConverter converter)
-
visit
protected void visit(List<org.jdom2.Element> specElements, XMLBinder.SpecVisitor visitor, Class<?> c) throws Exception
- Parameters:
c- for error messages- Throws:
Exception
-
specifyingTypeExplicitly
protected boolean specifyingTypeExplicitly(Class<?> c)
-
setter
public Method setter(Class<?> c, String field) throws XMLBinder.XMLBinderException
- Throws:
XMLBinder.XMLBinderException
-
hasCustomConverter
protected boolean hasCustomConverter(Class<?> fieldClass)
-
-