public class MappingDirect extends MappingBase
Modifier and Type | Field and Description |
---|---|
private BoundClass |
m_boundClass
Class file to use for added code.
|
private boolean |
m_isAbstract
Flag for abstract mapping.
|
private boolean |
m_isGenerated
Flag for code added to class (if appropriate).
|
private DirectObject |
m_mappingImpl
Direct mapping implementation.
|
ABSTRACTMARSHALLER_INTERFACE, CHECKEXTENDS_FULLNAME, CHECKEXTENDS_METHODNAME, CHECKEXTENDS_SIGNATURE, GETINDEX_METHODNAME, GETINDEX_SIGNATURE, GETMARSHALLER_METHOD, GETMARSHALLER_SIGNATURE, GETNAME_METHODNAME, GETNAME_SIGNATURE, GETUNMARSHALLER_METHOD, GETUNMARSHALLER_SIGNATURE, IMARSHALLABLE_INTERFACE, IUNMARSHALLABLE_INTERFACE, MARSHALLABLE_METHODNAME, MARSHALLABLE_SIGNATURE, MARSHALLER_INTERFACE, MARSHALLERMARSHAL_METHOD, MARSHALLERMARSHAL_SIGNATURE, UNMARSHALLABLE_METHODNAME, UNMARSHALLABLE_SIGNATURE, UNMARSHALLER_INTERFACE, UNMARSHALLERUNMARSHAL_METHOD, UNMARSHALLERUNMARSHAL_SIGNATURE
m_component
Constructor and Description |
---|
MappingDirect(IContainer contain,
java.lang.String type,
java.lang.String tname,
DirectObject dir,
boolean abs)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtension(MappingDefinition mdef)
Add extension to abstract mapping.
|
void |
addNamespace(NamespaceDefinition ns)
Add namespace.
|
IComponent |
buildRef(IContainer parent,
IContextObj objc,
java.lang.String type,
PropertyDefinition prop)
Build reference to mapping.
|
void |
generateCode(boolean force)
Generate required code for mapping.
|
ITypeBinding |
getBinding()
Get the actual binding for a mapping.
|
BoundClass |
getBoundClass()
Get the mapped class information.
|
java.lang.String |
getBoundType()
Get class name handled by mapping.
|
IComponent |
getImplComponent()
Get binding component implementing mapping.
|
ClassFile |
getMarshaller()
Get marshaller class used for mapping.
|
NameDefinition |
getName()
Get mapped element name.
|
java.util.ArrayList |
getNamespaces()
Get namespaces defined for mapping.
|
java.lang.String |
getReferenceType()
Get class name of type to be assumed for references to this mapping.
|
ClassFile |
getUnmarshaller()
Get unmarshaller class used for mapping.
|
NameDefinition |
getWrapperName()
Get element wrapper name.
|
boolean |
isAbstract()
Check if mapping is abstract.
|
boolean |
isBase()
Check if mapping has extensions.
|
void |
print(int depth) |
void |
setLinkages()
Establish and validate linkages between binding components.
|
addIMarshallableMethod, addIUnmarshallableMethod, getMappingName, getTypeName
handleRecursion, isLinked
genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent
private final DirectObject m_mappingImpl
private final BoundClass m_boundClass
private final boolean m_isAbstract
private boolean m_isGenerated
public MappingDirect(IContainer contain, java.lang.String type, java.lang.String tname, DirectObject dir, boolean abs) throws JiBXException
contain
- containing binding definition structuretype
- bound class nametname
- qualified type name (null
if not specified)dir
- direct object informationabs
- abstract mapping flagJiBXException
- on mapping definition conflictpublic BoundClass getBoundClass()
getBoundClass
in class MappingBase
public java.lang.String getBoundType()
IMapping
public java.lang.String getReferenceType()
IMapping
public IComponent getImplComponent()
IMapping
public ClassFile getMarshaller() throws JiBXException
IMapping
JiBXException
- if error in configurationpublic ClassFile getUnmarshaller() throws JiBXException
IMapping
JiBXException
- if error in configurationpublic NameDefinition getName()
IMapping
null
if no
element name defined for mapping)public void addNamespace(NamespaceDefinition ns)
IMapping
ns
- namespace definition to be addedpublic boolean isAbstract()
IMapping
true
if an abstract mapping, false
if notpublic boolean isBase()
IMapping
true
if one or more mappings extend this mapping,
false
if notpublic void addExtension(MappingDefinition mdef)
IMapping
mdef
- extension mapping definitionpublic IComponent buildRef(IContainer parent, IContextObj objc, java.lang.String type, PropertyDefinition prop) throws JiBXException
IMapping
parent
- containing binding definition structureobjc
- current object contexttype
- mapped value typeprop
- property definition (may be null
)JiBXException
- if configuration errorpublic java.util.ArrayList getNamespaces()
IMapping
null
if none)public void generateCode(boolean force) throws JiBXException
IMapping
force
- add marshaller/unmarshaller classes for abstract non-base
mappings flag (not passed on to children)JiBXException
- if error in transformationpublic NameDefinition getWrapperName()
IComponent
getWrapperName
in interface IComponent
getWrapperName
in class PassThroughComponent
null
if no wrapper elementpublic void setLinkages() throws JiBXException
ILinkable
setLinkages
in interface ILinkable
setLinkages
in class LinkableBase
JiBXException
- if error in configurationpublic ITypeBinding getBinding()
IMapping
null
if nonepublic void print(int depth)
print
in interface IComponent
print
in class LinkableBase