Package org.jibx.binding.def
Class MappingBase
java.lang.Object
org.jibx.binding.def.PassThroughComponent
org.jibx.binding.def.LinkableBase
org.jibx.binding.def.MappingBase
- All Implemented Interfaces:
IComponent,ILinkable,IMapping
- Direct Known Subclasses:
MappingDefinition,MappingDirect
Base class for mapping definitions. This is used for both normal and custom
mappings. It handles adding the appropriate marshalling and/or unmarshalling
interfaces and methods to the classes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprivate final StringName used for mapping in binding tables.private final StringQualified type name, in text form.protected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class org.jibx.binding.def.PassThroughComponent
m_component -
Constructor Summary
ConstructorsConstructorDescriptionMappingBase(IContainer contain, String type, String tname) Constructor.MappingBase(IContainer contain, String type, String tname, IComponent wrap) Constructor with wrapped component supplied. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGenerate marshallable interface methods for this mapping.protected voidGenerate unmarshallable interface method for this mapping.abstract BoundClassGet the mapped class information.Get the mapping name used in binding tables.Get type name.Methods inherited from class org.jibx.binding.def.LinkableBase
handleRecursion, isLinked, print, setLinkagesMethods inherited from class org.jibx.binding.def.PassThroughComponent
genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, getWrapperName, hasAttribute, hasContent, hasId, isOptional, setWrappedComponentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jibx.binding.def.ILinkable
setLinkagesMethods inherited from interface org.jibx.binding.def.IMapping
addExtension, addNamespace, buildRef, generateCode, getBinding, getBoundType, getImplComponent, getMarshaller, getName, getNamespaces, getReferenceType, getUnmarshaller, isAbstract, isBase
-
Field Details
-
IMARSHALLABLE_INTERFACE
- See Also:
-
MARSHALLABLE_METHODNAME
- See Also:
-
MARSHALLABLE_SIGNATURE
- See Also:
-
GETINDEX_METHODNAME
- See Also:
-
GETINDEX_SIGNATURE
- See Also:
-
GETNAME_METHODNAME
- See Also:
-
GETNAME_SIGNATURE
- See Also:
-
CHECKEXTENDS_METHODNAME
- See Also:
-
CHECKEXTENDS_FULLNAME
- See Also:
-
CHECKEXTENDS_SIGNATURE
- See Also:
-
IUNMARSHALLABLE_INTERFACE
- See Also:
-
UNMARSHALLABLE_METHODNAME
- See Also:
-
UNMARSHALLABLE_SIGNATURE
- See Also:
-
UNMARSHALLER_INTERFACE
- See Also:
-
UNMARSHALLERUNMARSHAL_METHOD
- See Also:
-
UNMARSHALLERUNMARSHAL_SIGNATURE
- See Also:
-
MARSHALLER_INTERFACE
- See Also:
-
ABSTRACTMARSHALLER_INTERFACE
- See Also:
-
MARSHALLERMARSHAL_METHOD
- See Also:
-
MARSHALLERMARSHAL_SIGNATURE
- See Also:
-
GETMARSHALLER_METHOD
- See Also:
-
GETMARSHALLER_SIGNATURE
- See Also:
-
GETUNMARSHALLER_METHOD
- See Also:
-
GETUNMARSHALLER_SIGNATURE
- See Also:
-
m_mappingName
Name used for mapping in binding tables. -
m_typeName
Qualified type name, in text form.
-
-
Constructor Details
-
MappingBase
Constructor. This version requires the component to be set later, using thePassThroughComponent.setWrappedComponent(org.jibx.binding.def.IComponent)method.- Parameters:
contain- containing binding definition structuretype- class name handled by mappingtname- qualified type name, in text form
-
MappingBase
Constructor with wrapped component supplied.- Parameters:
contain- containing binding definition structuretype- class name handled by mappingtname- qualified type name, in text formwrap- wrapped binding component
-
-
Method Details
-
getBoundClass
Get the mapped class information. This must be implemented in each subclass to return the type of the bound class.- Returns:
- information for mapped class
-
addIMarshallableMethod
Generate marshallable interface methods for this mapping. This is not applicable to abstract mappings, since they cannot be marshalled as separate items.- Throws:
JiBXException- if error in generating code
-
addIUnmarshallableMethod
Generate unmarshallable interface method for this mapping. This is not applicable to abstract mappings, since they cannot be unmarshalled as separate items.- Throws:
JiBXException- if error in generating code
-
getMappingName
Description copied from interface:IMappingGet the mapping name used in binding tables.- Specified by:
getMappingNamein interfaceIMapping- Returns:
- name
-
getTypeName
Description copied from interface:IMappingGet type name.- Specified by:
getTypeNamein interfaceIMapping- Returns:
- qualified type name, in text form (
nullif unnamed)
-