|
||||||||||
| 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.MappingDefinition
public class MappingDefinition
Normal mapping with defined binding. This is used for a mapping definition which includes detailed binding information (rather than marshaller and unmarshaller classes which handle the binding directly).
| Field Summary |
|---|
| Fields inherited from class org.jibx.binding.def.PassThroughComponent |
|---|
m_component |
| Constructor Summary | |
|---|---|
MappingDefinition(IContainer contain,
DefinitionContext defc,
String type,
NameDefinition name,
String tname,
boolean abs,
String base,
ObjectBinding bind,
boolean nillable)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addExtension(MappingDefinition mdef)
Add extension to abstract mapping. |
void |
addNamespace(NamespaceDefinition ns)
Add namespace. |
IComponent |
buildRef(IContainer parent,
IContextObj objc,
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. |
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. |
ArrayList |
getNamespaces()
Get namespaces defined for mapping. |
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 |
linkMappings()
Links extension mappings to their base mappings. |
void |
print(int depth)
|
void |
setLinkages()
Establish and validate linkages between binding components. |
| Methods inherited from class org.jibx.binding.def.MappingBase |
|---|
addIMarshallableMethod, addIUnmarshallableMethod, getMappingName, 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 |
| Constructor Detail |
|---|
public MappingDefinition(IContainer contain,
DefinitionContext defc,
String type,
NameDefinition name,
String tname,
boolean abs,
String base,
ObjectBinding bind,
boolean nillable)
throws JiBXException
contain - containing binding definition structuredefc - definition context for this mappingtype - bound class namename - mapped element name information (null if none)tname - qualified type name for abstract mapping (null
if none)abs - abstract mapping flagbase - abstract mapping extended by this onebind - binding definition component (may be null if a
concrete mapping)nillable - flag for nillable element
JiBXException - if class definition not found| Method Detail |
|---|
public BoundClass getBoundClass()
getBoundClass in class MappingBase
public void linkMappings()
throws JiBXException
JiBXException - if error in linkingpublic String getBoundType()
IMapping
public String getReferenceType()
IMapping
public IComponent getImplComponent()
IMapping
public ClassFile getMarshaller()
IMapping
public ClassFile getUnmarshaller()
IMapping
public NameDefinition getName()
IMapping
null if no
element name defined for mapping)
public void addNamespace(NamespaceDefinition ns)
throws JiBXException
IMapping
ns - namespace definition to be added
JiBXException - if error in defining namespacepublic 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 not
public void addExtension(MappingDefinition mdef)
throws JiBXException
IMapping
mdef - extension mapping definition
JiBXException - if configuration error
public IComponent buildRef(IContainer parent,
IContextObj objc,
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 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
ILinkable
setLinkages in interface ILinkablesetLinkages in class LinkableBaseJiBXException - if error in configurationpublic ITypeBinding getBinding()
IMapping
null if nonepublic 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 | |||||||||