com.openharbor.beck.marshal
Class CollectionMarshaller
java.lang.Object
com.openharbor.beck.marshal.DefaultMarshaller
com.openharbor.beck.marshal.CollectionMarshaller
- All Implemented Interfaces:
- Marshaller
- Direct Known Subclasses:
- InlineCollectionMarshaller, ListMarshaller
- public class CollectionMarshaller
- extends DefaultMarshaller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_TAG
protected static final XMLThing NO_TAG
- Indicates the absence of a tag (to writeAsElement).
memberGetter
protected static final Getter memberGetter
CollectionMarshaller
public CollectionMarshaller()
writeAsElement
protected void writeAsElement(MapToXML mapper,
java.lang.Object parent,
Getter getter,
java.lang.Object source,
XMLThing tag,
XMLWriter writer)
throws java.lang.Exception
- 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 DefaultMarshaller
- 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
writeMembers
protected void writeMembers(MapToXML mapper,
java.util.Collection source,
XMLThing sourceTag,
XMLWriter writer)
throws java.lang.Exception
- Map the members of the given collection to XML elements.
Normally there is an element for each member.
- Throws:
java.lang.Exception