|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.jibx.binding.def.PassThroughComponent
org.jibx.binding.def.LinkableBase
org.jibx.binding.def.MappingBase
org.jibx.binding.def.MappingDirect
public class MappingDirect
Direct mapping using supplied marshaller and unmarshaller.
| Field Summary | |
|---|---|
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. |
| Fields inherited from class org.jibx.binding.def.PassThroughComponent |
|---|
m_component |
| Constructor Summary | |
|---|---|
MappingDirect(IContainer contain,
java.lang.String type,
java.lang.String tname,
DirectObject dir,
boolean abs)
Constructor. |
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class org.jibx.binding.def.MappingBase |
|---|
addIMarshallableMethod, addIUnmarshallableMethod, getIndex, getTypeName |
| Methods inherited from class org.jibx.binding.def.LinkableBase |
|---|
handleRecursion, isLinked |
| Methods inherited from class org.jibx.binding.def.PassThroughComponent |
|---|
genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jibx.binding.def.IComponent |
|---|
genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional |
| Field Detail |
|---|
private final DirectObject m_mappingImpl
private final BoundClass m_boundClass
private final boolean m_isAbstract
private boolean m_isGenerated
| Constructor Detail |
|---|
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 flag
JiBXException - on mapping definition conflict| Method Detail |
|---|
public BoundClass getBoundClass()
getBoundClass in class MappingBasepublic 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 configuration
public 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 definition
public 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 IComponentgetWrapperName in class PassThroughComponentnull if no wrapper element
public void setLinkages()
throws JiBXException
IComponent
setLinkages in interface IComponentsetLinkages in class LinkableBaseJiBXException - if error in configurationpublic void print(int depth)
print in interface IComponentprint in class LinkableBase
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||