com.openharbor.beck.marshal
Class InlineCollectionMarshaller

java.lang.Object
  extended bycom.openharbor.beck.marshal.DefaultMarshaller
      extended bycom.openharbor.beck.marshal.CollectionMarshaller
          extended bycom.openharbor.beck.marshal.InlineCollectionMarshaller
All Implemented Interfaces:
Marshaller

public class InlineCollectionMarshaller
extends CollectionMarshaller

A CollectionMarshaller that doesn't map the Collection to any XMLThing. The members are mapped to elements contained directly within the element mapped from the object that contains the collection.


Nested Class Summary
 
Nested classes inherited from class com.openharbor.beck.marshal.CollectionMarshaller
CollectionMarshaller.Candidate
 
Field Summary
 
Fields inherited from class com.openharbor.beck.marshal.CollectionMarshaller
memberGetter, NO_TAG
 
Fields inherited from class com.openharbor.beck.marshal.DefaultMarshaller
log
 
Constructor Summary
InlineCollectionMarshaller()
           
 
Method Summary
protected  void writeAsElement(MapToXML mapper, java.lang.Object parent, Getter getter, java.lang.Object source, XMLThing tag, XMLWriter writer)
          Map to XML elements from the source collection and its members.
 
Methods inherited from class com.openharbor.beck.marshal.CollectionMarshaller
writeMembers
 
Methods inherited from class com.openharbor.beck.marshal.DefaultMarshaller
getText, getXML, getXMLSource, marshal, marshalMember, writeNull, writeSimply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InlineCollectionMarshaller

public InlineCollectionMarshaller()
Method Detail

writeAsElement

protected void writeAsElement(MapToXML mapper,
                              java.lang.Object parent,
                              Getter getter,
                              java.lang.Object source,
                              XMLThing tag,
                              XMLWriter writer)
                       throws java.lang.Exception
Description copied from class: CollectionMarshaller
Map to XML elements from the source collection and its members. Normally there is an element for the collection, which contains an element for each member.

Overrides:
writeAsElement in class CollectionMarshaller
Parameters:
tag - the XML element corresponding to the collection, or NO_TAG to indicate that there is no such tag; in which case the members are marshalled 'in line', contained directly in the element copied from the parent object. NO_TAG is recognized by == not .equals; that is, it must be exactly the same object, not another object of equal value.
Throws:
java.lang.Exception