|
||||||||||
| 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.MappingReference
public class MappingReference
Reference to a mapping definition. This is used as a placeholder when building the component structure of a binding definition. It's necessary because the referenced mapping may not have been parsed yet. During the linkage phase that follows parsing this looks up the appropriate mapping definition and sets up the corresponding component structure. Thereafter it operates as a simple pass-through wrapper for the top child component.
| Field Summary |
|---|
| Fields inherited from class org.jibx.binding.def.PassThroughComponent |
|---|
m_component |
| Constructor Summary | |
|---|---|
MappingReference(IContainer contain,
PropertyDefinition prop,
String type,
String reftext,
String refqname,
IContextObj objc,
NameDefinition name,
boolean synth,
boolean nillable)
Constructor from property and type. |
|
| Method Summary | |
|---|---|
void |
genContentUnmarshal(ContextMethodBuilder mb)
Patch the generated code to remove the unmarshalled object when it's a "this" reference with both elements and attributes. |
IMapping |
getMapping()
|
String |
getType()
Get type expected by component. |
boolean |
isOptional()
Check if component is an optional item. |
void |
print(int depth)
|
void |
setLinkages()
Establish and validate linkages between binding components. |
| Methods inherited from class org.jibx.binding.def.PassThroughComponent |
|---|
genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genLoadId, genNewInstance, getWrapperName, hasAttribute, hasContent, hasId, setWrappedComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MappingReference(IContainer contain,
PropertyDefinition prop,
String type,
String reftext,
String refqname,
IContextObj objc,
NameDefinition name,
boolean synth,
boolean nillable)
contain - containing binding definition structureprop - property definitiontype - fully qualified name of mapped typereftext - ordinary text name for abstract mapping reference
(null if not specified)refqname - qualified type name for abstract mapping reference
(null if not specified)objc - current object contextname - reference name definition (only allowed with abstract
mappings)synth - sythentic reference added to empty collection flagnillable - flag for nillable element| Method Detail |
|---|
public IMapping getMapping()
public boolean isOptional()
IComponent
isOptional in interface IComponentisOptional in class PassThroughComponenttrue if optional, false if requiredpublic String getType()
IComponent
getType in interface IComponentgetType in class PassThroughComponent
public void setLinkages()
throws JiBXException
ILinkable
setLinkages in interface ILinkablesetLinkages in class PassThroughComponentJiBXException - if error in configuration
public void genContentUnmarshal(ContextMethodBuilder mb)
throws JiBXException
genContentUnmarshal in interface IComponentgenContentUnmarshal in class PassThroughComponentmb -
JiBXExceptionpublic void print(int depth)
print in interface IComponentprint in class PassThroughComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||