org.progeeks.meta.xml
Class MapXmlRenderer

java.lang.Object
  extended by org.progeeks.meta.xml.AbstractXmlPropertyRenderer
      extended by org.progeeks.meta.xml.MapXmlRenderer
All Implemented Interfaces:
XmlPropertyRenderer

public class MapXmlRenderer
extends AbstractXmlPropertyRenderer

XML renderer that writes out a map that can be read back in by the MapObjectHandler.

The XML coding will look like the following:

 <java.util.HashMap>
      <mapEntries>
         <map.Entry>
            <key><myFooBean /></key>
            <value><myBarBean /></value>
        </map.Entry>
        <map.Entry key="someKey" value="some value" />
     </mapEntries>
  </java.util.HashMap>
 

Version:
$Revision: 1.10 $
Author:
Paul Wisneskey

Constructor Summary
MapXmlRenderer()
           
 
Method Summary
 void render(java.lang.Object value, PropertyType type, boolean forceWrap, XmlRenderContext context)
          Renders the specified Mutator's value to the specified writer.
 
Methods inherited from class org.progeeks.meta.xml.AbstractXmlPropertyRenderer
canRenderAsAttribute, findEm, getAsAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapXmlRenderer

public MapXmlRenderer()
Method Detail

render

public void render(java.lang.Object value,
                   PropertyType type,
                   boolean forceWrap,
                   XmlRenderContext context)
Renders the specified Mutator's value to the specified writer.

Specified by:
render in interface XmlPropertyRenderer
Specified by:
render in class AbstractXmlPropertyRenderer
Parameters:
value - The value to be rendered.
type - The specific type that was used to lookup this renderer.
forceWrap - Set to true if the renderer should wrap the value in its own style of start/end tags. False indicates that the renderer can optionally leave them out. This is usually used by renderers that support types that can be defined as strings directly.
context - Contains the rendering output information for this session.


Copyright © 2002-2003 Paul Speed. All Rights Reserved.