rdonkin     2004/03/24 14:49:22

  Modified:    betwixt/src/java/org/apache/commons/betwixt/io
                        AbstractBeanWriter.java
  Log:
  Added a way for the subclass writers to discover what the current element is. I'm 
not very happy with this design, I think that probably it would be better to alter the 
SAX inspirected API so that a context is passed through but more time is needed to 
consider this change and I'd like to add support for CDATA encoding today (since there 
are users waiting).
  
  Revision  Changes    Path
  1.24      +4 -2      
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/AbstractBeanWriter.java
  
  Index: AbstractBeanWriter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/AbstractBeanWriter.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- AbstractBeanWriter.java   28 Feb 2004 13:38:33 -0000      1.23
  +++ AbstractBeanWriter.java   24 Mar 2004 22:49:22 -0000      1.24
  @@ -70,6 +70,8 @@
       private boolean writeEmptyElements = true;
       /** Dynamic binding configuration settings */
       private BindingConfiguration bindingConfiguration = new BindingConfiguration();
  +    // TODO: consider whether this should be replaced by a passed through context 
  +    protected ElementDescriptor currentDescriptor;
       
       /**
        * Marks the start of the bean writing.
  @@ -664,7 +666,7 @@
                                   IOException, 
                                   SAXException,
                                   IntrospectionException {     
  -                                
  +        currentDescriptor = elementDescriptor;               
           Descriptor[] childDescriptors = elementDescriptor.getContentDescriptors();
           if ( childDescriptors != null && childDescriptors.length > 0 ) {
               // process child elements
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to