public class TypedArrayMapper extends Object implements IMarshaller, IUnmarshaller, IAliasable
Custom marshaller/unmarshaller for reference arrays of a particular type.
This handles mapping arrays typed as object-type[], where the
object-type is any class name (not a primitive type). All items in the
array must be of a mapped type. If a name is specified by the mapping
definition that name is used as a wrapper around the elements representing
the items in the array; otherwise, the elements are just handled inline.
| Constructor and Description |
|---|
TypedArrayMapper(String type)
Class only constructor.
|
TypedArrayMapper(String uri,
int index,
String name,
String type)
Aliased constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isExtension(String mapname) |
boolean |
isPresent(IUnmarshallingContext ctx) |
void |
marshal(Object obj,
IMarshallingContext ictx) |
Object |
unmarshal(Object obj,
IUnmarshallingContext ictx) |
public TypedArrayMapper(String uri, int index, String name, String type)
uri - namespace URI for the top-level elementindex - namespace index corresponding to the defined URI within the
marshalling context definitionsname - local name for the top-level elementtype - class name for type of items in arraypublic TypedArrayMapper(String type)
type - class name for type of items in arraypublic boolean isExtension(String mapname)
isExtension in interface IMarshallerpublic void marshal(Object obj, IMarshallingContext ictx) throws JiBXException
marshal in interface IMarshallerJiBXExceptionpublic boolean isPresent(IUnmarshallingContext ctx) throws JiBXException
isPresent in interface IUnmarshallerJiBXExceptionpublic Object unmarshal(Object obj, IUnmarshallingContext ictx) throws JiBXException
unmarshal in interface IUnmarshallerJiBXExceptionCopyright © 2005-2014 jibx.org. All Rights Reserved.