public class TypedArrayMapper extends Object implements org.jibx.runtime.IMarshaller, org.jibx.runtime.IUnmarshaller, org.jibx.runtime.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(org.jibx.runtime.IUnmarshallingContext ctx) |
void |
marshal(Object obj,
org.jibx.runtime.IMarshallingContext ictx) |
Object |
unmarshal(Object obj,
org.jibx.runtime.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 org.jibx.runtime.IMarshallerpublic void marshal(Object obj, org.jibx.runtime.IMarshallingContext ictx) throws org.jibx.runtime.JiBXException
marshal in interface org.jibx.runtime.IMarshallerorg.jibx.runtime.JiBXExceptionpublic boolean isPresent(org.jibx.runtime.IUnmarshallingContext ctx)
throws org.jibx.runtime.JiBXException
isPresent in interface org.jibx.runtime.IUnmarshallerorg.jibx.runtime.JiBXExceptionCopyright © 2005–2020 jibx.org. All rights reserved.