|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.jibx.binding.def.BindingBuilder.ContainerBase
org.jibx.binding.def.NestedBase
public abstract class NestedBase
Base class for structure and collection binding definitions. This handles one or more child components, which may be ordered or unordered.
| Field Summary | |
|---|---|
protected java.util.ArrayList |
m_attributes
Included attribute definitions (lazy create, only if needed). |
protected java.util.ArrayList |
m_contents
Nested content definitions (initially used for all child components). |
private IContextObj |
m_contextObject
Context object for this definition. |
private DefinitionContext |
m_defContext
Definition context for container (may be same as parent). |
private boolean |
m_hasContext
Flag for context defined at level. |
protected boolean |
m_isOrdered
Flag for ordered child content (used by subclasses). |
| Fields inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase |
|---|
m_accessLevel, m_autoLink, m_container, m_nameStyle, m_stripPrefix, m_stripSuffix, m_styleDefault |
| Constructor Summary | |
|---|---|
NestedBase(IContainer contain,
IContextObj objc,
boolean ord,
boolean defc)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addComponent(IComponent comp)
Add child component to nested structure. |
void |
genContentPresentTest(ContextMethodBuilder mb)
Generate code to test for content present. |
void |
genNewInstance(ContextMethodBuilder mb)
Generate code to create new instance of object. |
java.util.ArrayList |
getAttributes()
Get the attribute children of this mapping. |
BindingDefinition |
getBindingRoot()
Get root of binding definition. |
java.util.ArrayList |
getContents()
Get the content children of this mapping. |
DefinitionContext |
getDefinitionContext()
Get definition context for binding element. |
java.lang.String |
getType()
Get type expected by component. |
boolean |
hasContent()
Check if component defines one or more elements or text values as children of the containing element. |
boolean |
hasNamespaces()
|
boolean |
isContentOrdered()
Check if content children are ordered. |
boolean |
isOptional()
Check if component is an optional item. |
| Methods inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase |
|---|
getStyleDefault, unmarshal |
| 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 |
|---|
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentUnmarshal, genLoadId, hasAttribute, hasId, print, setLinkages |
| Methods inherited from interface org.jibx.binding.def.IContainer |
|---|
getStyleDefault |
| Field Detail |
|---|
private final IContextObj m_contextObject
private final boolean m_hasContext
protected final boolean m_isOrdered
private final DefinitionContext m_defContext
protected java.util.ArrayList m_attributes
protected java.util.ArrayList m_contents
| Constructor Detail |
|---|
public NestedBase(IContainer contain,
IContextObj objc,
boolean ord,
boolean defc)
contain - containing binding definition contextobjc - current object contextord - ordered content flagdefc - define context for structure flag| Method Detail |
|---|
public java.util.ArrayList getAttributes()
null if none; should not
be modified)public java.util.ArrayList getContents()
public void addComponent(IComponent comp)
IComponent.setLinkages() is called the
components are checked to determine whether they actually supply
attribute(s), content, or both.
comp - child component to be added to structurepublic boolean isContentOrdered()
IContainer
isContentOrdered in interface IContainertrue if ordered, false if notpublic boolean hasNamespaces()
public BindingDefinition getBindingRoot()
IContainer
getBindingRoot in interface IContainerpublic DefinitionContext getDefinitionContext()
IContainer
getDefinitionContext in interface IContainerpublic boolean isOptional()
IComponent
isOptional in interface IComponenttrue if optional, false if requiredpublic boolean hasContent()
IComponentIComponent.setLinkages().
hasContent in interface IComponenttrue if one or more content values defined
for containing element, false if not
public void genContentPresentTest(ContextMethodBuilder mb)
throws JiBXException
IComponent
genContentPresentTest in interface IComponentmb - method builder
JiBXException - if configuration errorpublic void genNewInstance(ContextMethodBuilder mb)
IComponent
genNewInstance in interface IComponentmb - method builderpublic java.lang.String getType()
IComponent
getType in interface IComponent
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||