[Practicalxml-commits] SF.net SVN: practicalxml:[107] branches/dev-1.1/src/main/java/net/sf/ pract
Brought to you by:
kdgregory
From: Auto-Generated S. C. M. <pra...@li...> - 2009-08-15 18:13:31
|
Revision: 107 http://practicalxml.svn.sourceforge.net/practicalxml/?rev=107&view=rev Author: kdgregory Date: 2009-08-15 18:13:24 +0000 (Sat, 15 Aug 2009) Log Message: ----------- comment change, private var name change Modified Paths: -------------- branches/dev-1.1/src/main/java/net/sf/practicalxml/converter/bean2xml/Bean2XmlDriver.java Modified: branches/dev-1.1/src/main/java/net/sf/practicalxml/converter/bean2xml/Bean2XmlDriver.java =================================================================== --- branches/dev-1.1/src/main/java/net/sf/practicalxml/converter/bean2xml/Bean2XmlDriver.java 2009-08-14 20:20:09 UTC (rev 106) +++ branches/dev-1.1/src/main/java/net/sf/practicalxml/converter/bean2xml/Bean2XmlDriver.java 2009-08-15 18:13:24 UTC (rev 107) @@ -35,22 +35,20 @@ /** - * Driver class for converting bean data to an XML representation. In normal - * usage, an instance of this class is constructed with the desired conversion - * options, then {@link #convert} is called with the compound object to be - * converted. The driver may be reused for multiple conversions, and is - * thread-safe. + * Driver class for converting a Java bean into an XML DOM. Normal usage is + * to create a single instance of this class with desired options, then use + * it for multiple conversions. This class is thread-safe. */ public class Bean2XmlDriver { + private ConversionHelper _helper; private EnumSet<Bean2XmlOptions> _options = EnumSet.noneOf(Bean2XmlOptions.class); - private ConversionHelper _primitiveHelper; public Bean2XmlDriver(Bean2XmlOptions... options) { + _helper = new ConversionHelper(shouldUseXsdFormatting()); for (Bean2XmlOptions option : options) _options.add(option); - _primitiveHelper = new ConversionHelper(shouldUseXsdFormatting()); } @@ -158,10 +156,10 @@ if (obj != null) klass = obj.getClass(); - String objType = _primitiveHelper.getXsdType(klass); + String objType = _helper.getXsdType(klass); if ((obj == null) || (objType != null)) { - appender.appendValue(name, objType, _primitiveHelper.stringify(obj)); + appender.appendValue(name, objType, _helper.stringify(obj)); return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |