org.jibx.runtime
Interface IAliasable

All Known Implementing Classes:
Dom4JElementMapper, DomElementMapper, HashMapperStringToComplex, HashMapperStringToSchemaType, IdDefRefMapperBase, IdRefMapperBase, ObjectArrayMapper, TypedArrayMapper

public interface IAliasable

Nameable extension interface definition. This interface must be implemented by a marshaller IMarshaller or unmarshaller IUnmarshaller that can use different top-level element names. Although it does not define any methods, it designates the marshaller or unmarshaller as being usable with a namespace and element name, and particular bound class name, defined within a binding. If this interface is implemented by a marshaller or unmarshaller class used with a specified element name in a binding the binding compiler will actually generate a subclass of the original class. The subclass uses a standard no-argument constructor, but calls a superclass constructor with the specified element name information. The superclass code can then make use of the specified name in marshalling and/or unmarshalling. For a marshaller-only class, the required constructor takes a pair of arguments, with the first argument the namespace URI index and the second the actual element name string. For an unmarshaller-only class, the constructor must take a pair of arguments, with the first argument the namespace URI and the second the element name. For a class which is both a marshaller and an unmarshaller, the constructor must take three arguments, with the first argument the namespace URI string, the second the namespace URI index, and the third the actual element name.

Author:
Dennis M. Sosnoski



Project Web Site