|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.jibx.binding.def.PrecompiledAbstractMapping
public class PrecompiledAbstractMapping
Abstract mapping defined by a precompiled binding. This is constructed from the binding factory information for a binding which is referenced using a precompiled='true' attribute.
| Field Summary | |
|---|---|
private PrecompiledBinding |
m_binding
Binding structure defining the mapping. |
private ClassFile |
m_class
Class linked to mapping. |
private java.lang.String |
m_mappingName
Name used for mapping in binding tables. |
private java.util.ArrayList |
m_namespaces
Namespaces used by this mapping. |
private IContainer |
m_parent
Containing context for definition. |
private java.lang.String |
m_referenceType
Reference type of mapping, as fully qualified class name. |
private boolean |
m_translated
Namespace index translation required flag. |
private java.lang.String |
m_typeName
Qualified type name. |
| Constructor Summary | |
|---|---|
PrecompiledAbstractMapping(java.lang.String type,
java.lang.String tname,
java.lang.String mapname,
int index,
IBindingFactory factory,
int[] nsxlate,
IContainer parent)
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. |
ITypeBinding |
getBinding()
Get the actual binding for a mapping. |
java.lang.String |
getBoundType()
Get class name handled by mapping. |
IComponent |
getImplComponent()
Get binding component implementing mapping. |
java.lang.String |
getMappingName()
Get the mapping name used in binding tables. |
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. |
java.lang.String |
getTypeName()
Get type name. |
ClassFile |
getUnmarshaller()
Get unmarshaller class used for mapping. |
NameDefinition |
getWrapperName()
|
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final boolean m_translated
private final ClassFile m_class
private final java.lang.String m_typeName
private final PrecompiledBinding m_binding
private final java.lang.String m_referenceType
private final java.util.ArrayList m_namespaces
private final IContainer m_parent
private final java.lang.String m_mappingName
| Constructor Detail |
|---|
public PrecompiledAbstractMapping(java.lang.String type,
java.lang.String tname,
java.lang.String mapname,
int index,
IBindingFactory factory,
int[] nsxlate,
IContainer parent)
throws JiBXException
type - bound class nametname - qualified type name for abstract mapping (null
if none)mapname - abstract mapping name in bindingindex - abstract mapping index in bindingfactory - binding factory for mapping informationnsxlate - namespace index translation table (null if
none)parent - containing context
JiBXException - if class definition not found| Method Detail |
|---|
public void linkMappings()
throws JiBXException
JiBXException - if error in linkingpublic java.lang.String getBoundType()
IMapping
getBoundType in interface IMappingpublic java.lang.String getReferenceType()
IMapping
getReferenceType in interface IMappingpublic IComponent getImplComponent()
IMapping
getImplComponent in interface IMappingpublic ClassFile getMarshaller()
IMapping
getMarshaller in interface IMappingpublic ClassFile getUnmarshaller()
IMapping
getUnmarshaller in interface IMappingpublic NameDefinition getName()
IMapping
getName in interface IMappingnull if no
element name defined for mapping)
public void addNamespace(NamespaceDefinition ns)
throws JiBXException
IMapping
addNamespace in interface IMappingns - namespace definition to be added
JiBXException - if error in defining namespacepublic boolean isAbstract()
IMapping
isAbstract in interface IMappingtrue if an abstract mapping, false
if notpublic boolean isBase()
IMapping
isBase in interface IMappingtrue if one or more mappings extend this mapping,
false if not
public void addExtension(MappingDefinition mdef)
throws JiBXException
IMapping
addExtension in interface IMappingmdef - extension mapping definition
JiBXException - if configuration error
public IComponent buildRef(IContainer parent,
IContextObj objc,
java.lang.String type,
PropertyDefinition prop)
throws JiBXException
IMapping
buildRef in interface IMappingparent - containing binding definition structureobjc - current object contexttype - mapped value typeprop - property definition (may be null)
JiBXException - if configuration errorpublic java.util.ArrayList getNamespaces()
IMapping
getNamespaces in interface IMappingnull if none)
public void generateCode(boolean force)
throws JiBXException
IMapping
generateCode in interface IMappingforce - add marshaller/unmarshaller classes for abstract non-base
mappings flag (not passed on to children)
JiBXException - if error in transformationpublic NameDefinition getWrapperName()
public ITypeBinding getBinding()
IMapping
getBinding in interface IMappingnull if nonepublic java.lang.String getMappingName()
IMapping
getMappingName in interface IMappingpublic java.lang.String getTypeName()
IMapping
getTypeName in interface IMappingnull if
unnamed)
public void setLinkages()
throws JiBXException
ILinkable
setLinkages in interface ILinkableJiBXException - if error in configurationpublic void print(int depth)
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||