Class MappingBase

  • All Implemented Interfaces:
    IComponent, ILinkable, IMapping
    Direct Known Subclasses:
    MappingDefinition, MappingDirect

    public abstract class MappingBase
    extends LinkableBase
    implements IMapping
    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 Detail

      • IMARSHALLABLE_INTERFACE

        protected static final java.lang.String IMARSHALLABLE_INTERFACE
        See Also:
        Constant Field Values
      • MARSHALLABLE_METHODNAME

        protected static final java.lang.String MARSHALLABLE_METHODNAME
        See Also:
        Constant Field Values
      • MARSHALLABLE_SIGNATURE

        protected static final java.lang.String MARSHALLABLE_SIGNATURE
        See Also:
        Constant Field Values
      • GETINDEX_METHODNAME

        protected static final java.lang.String GETINDEX_METHODNAME
        See Also:
        Constant Field Values
      • GETINDEX_SIGNATURE

        protected static final java.lang.String GETINDEX_SIGNATURE
        See Also:
        Constant Field Values
      • GETNAME_METHODNAME

        protected static final java.lang.String GETNAME_METHODNAME
        See Also:
        Constant Field Values
      • GETNAME_SIGNATURE

        protected static final java.lang.String GETNAME_SIGNATURE
        See Also:
        Constant Field Values
      • CHECKEXTENDS_METHODNAME

        protected static final java.lang.String CHECKEXTENDS_METHODNAME
        See Also:
        Constant Field Values
      • CHECKEXTENDS_FULLNAME

        protected static final java.lang.String CHECKEXTENDS_FULLNAME
        See Also:
        Constant Field Values
      • CHECKEXTENDS_SIGNATURE

        protected static final java.lang.String CHECKEXTENDS_SIGNATURE
        See Also:
        Constant Field Values
      • IUNMARSHALLABLE_INTERFACE

        protected static final java.lang.String IUNMARSHALLABLE_INTERFACE
        See Also:
        Constant Field Values
      • UNMARSHALLABLE_METHODNAME

        protected static final java.lang.String UNMARSHALLABLE_METHODNAME
        See Also:
        Constant Field Values
      • UNMARSHALLABLE_SIGNATURE

        protected static final java.lang.String UNMARSHALLABLE_SIGNATURE
        See Also:
        Constant Field Values
      • UNMARSHALLER_INTERFACE

        protected static final java.lang.String UNMARSHALLER_INTERFACE
        See Also:
        Constant Field Values
      • UNMARSHALLERUNMARSHAL_METHOD

        protected static final java.lang.String UNMARSHALLERUNMARSHAL_METHOD
        See Also:
        Constant Field Values
      • UNMARSHALLERUNMARSHAL_SIGNATURE

        protected static final java.lang.String UNMARSHALLERUNMARSHAL_SIGNATURE
        See Also:
        Constant Field Values
      • MARSHALLER_INTERFACE

        protected static final java.lang.String MARSHALLER_INTERFACE
        See Also:
        Constant Field Values
      • ABSTRACTMARSHALLER_INTERFACE

        protected static final java.lang.String ABSTRACTMARSHALLER_INTERFACE
        See Also:
        Constant Field Values
      • MARSHALLERMARSHAL_METHOD

        protected static final java.lang.String MARSHALLERMARSHAL_METHOD
        See Also:
        Constant Field Values
      • MARSHALLERMARSHAL_SIGNATURE

        protected static final java.lang.String MARSHALLERMARSHAL_SIGNATURE
        See Also:
        Constant Field Values
      • GETMARSHALLER_METHOD

        protected static final java.lang.String GETMARSHALLER_METHOD
        See Also:
        Constant Field Values
      • GETMARSHALLER_SIGNATURE

        protected static final java.lang.String GETMARSHALLER_SIGNATURE
        See Also:
        Constant Field Values
      • GETUNMARSHALLER_METHOD

        protected static final java.lang.String GETUNMARSHALLER_METHOD
        See Also:
        Constant Field Values
      • GETUNMARSHALLER_SIGNATURE

        protected static final java.lang.String GETUNMARSHALLER_SIGNATURE
        See Also:
        Constant Field Values
      • m_mappingName

        private final java.lang.String m_mappingName
        Name used for mapping in binding tables.
      • m_typeName

        private final java.lang.String m_typeName
        Qualified type name, in text form.
    • Constructor Detail

      • MappingBase

        public MappingBase​(IContainer contain,
                           java.lang.String type,
                           java.lang.String tname,
                           IComponent wrap)
        Constructor with wrapped component supplied.
        Parameters:
        contain - containing binding definition structure
        type - class name handled by mapping
        tname - qualified type name, in text form
        wrap - wrapped binding component
    • Method Detail

      • getBoundClass

        public abstract BoundClass 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

        protected void addIMarshallableMethod()
                                       throws JiBXException
        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

        protected void addIUnmarshallableMethod()
                                         throws JiBXException
        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

        public java.lang.String getMappingName()
        Description copied from interface: IMapping
        Get the mapping name used in binding tables.
        Specified by:
        getMappingName in interface IMapping
        Returns:
        name
      • getTypeName

        public java.lang.String getTypeName()
        Description copied from interface: IMapping
        Get type name.
        Specified by:
        getTypeName in interface IMapping
        Returns:
        qualified type name, in text form (null if unnamed)