public abstract class NestedBase extends Object implements IComponent, IContainer
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_accessLevel
Access level for default mappings.
|
protected ArrayList |
m_attributes
Included attribute definitions (lazy create, only if needed).
|
protected int |
m_autoLink
Auto-link style for default mappings.
|
protected IContainer |
m_container
Containing binding component.
|
protected ArrayList |
m_contents
Nested content definitions (initially used for all child components).
|
protected boolean |
m_isFlexible
Flag for flexible element handling (used by subclasses).
|
protected boolean |
m_isOrdered
Flag for ordered child content (used by subclasses).
|
protected int |
m_nameStyle
Style used for generating element or attribute names.
|
protected String |
m_stripPrefix
Prefix text to be stripped from names.
|
protected String |
m_stripSuffix
Suffix text to be stripped from names.
|
protected int |
m_styleDefault
Default style for value expression.
|
| Constructor and Description |
|---|
NestedBase(IContainer contain,
IContextObj objc,
boolean ord,
boolean flex,
boolean defc)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComponent(IComponent comp)
Add child component to nested structure.
|
void |
genContentPresentTest(ContextMethodBuilder mb)
Generate code to test for content present.
|
ArrayList |
getAttributes()
Get the attribute children of this mapping.
|
BindingDefinition |
getBindingRoot()
Get root of binding definition.
|
ArrayList |
getContents()
Get the content children of this mapping.
|
DefinitionContext |
getDefinitionContext()
Get definition context for binding element.
|
int |
getStyleDefault() |
String |
getType()
Get type expected by component.
|
NameDefinition |
getWrapperName()
Get element wrapper name.
|
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 |
isFlexible()
Check if flexible unmarshalling.
|
boolean |
isOptional()
Check if component is an optional item.
|
void |
setObjectContext(IContextObj objc)
Set the object context.
|
void |
unmarshal(org.jibx.runtime.impl.UnmarshallingContext ctx)
Unmarshal common container attributes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentUnmarshal, genLoadId, genNewInstance, hasAttribute, hasId, printsetLinkagesgetStyleDefaultprotected final boolean m_isOrdered
protected final boolean m_isFlexible
protected ArrayList m_attributes
protected ArrayList m_contents
protected IContainer m_container
protected int m_styleDefault
protected int m_autoLink
protected int m_accessLevel
protected String m_stripPrefix
protected String m_stripSuffix
protected int m_nameStyle
public NestedBase(IContainer contain, IContextObj objc, boolean ord, boolean flex, boolean defc)
contain - containing binding definition contextobjc - current object contextord - ordered content flagflex - flexible element handling flagdefc - define context for structure flagpublic void setObjectContext(IContextObj objc)
objc - object contextpublic ArrayList getAttributes()
null if none; should not
be modified)public ArrayList getContents()
public void addComponent(IComponent comp)
ILinkable.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 isFlexible()
public boolean isContentOrdered()
IContainerisContentOrdered in interface IContainertrue if ordered, false if notpublic boolean hasNamespaces()
public BindingDefinition getBindingRoot()
IContainergetBindingRoot in interface IContainerpublic DefinitionContext getDefinitionContext()
IContainergetDefinitionContext in interface IContainerpublic boolean isOptional()
IComponentisOptional in interface IComponenttrue if optional, false if requiredpublic boolean hasContent()
IComponentILinkable.setLinkages().hasContent in interface IComponenttrue if one or more content values defined
for containing element, false if notpublic void genContentPresentTest(ContextMethodBuilder mb) throws org.jibx.runtime.JiBXException
IComponentgenContentPresentTest in interface IComponentmb - method builderorg.jibx.runtime.JiBXException - if configuration errorpublic String getType()
IComponentgetType in interface IComponentpublic NameDefinition getWrapperName()
IComponentgetWrapperName in interface IComponentnull if no wrapper elementpublic void unmarshal(org.jibx.runtime.impl.UnmarshallingContext ctx)
throws org.jibx.runtime.JiBXException
ctx - unmarshalling context informationorg.jibx.runtime.JiBXException - if error in unmarshallingpublic int getStyleDefault()
Copyright © 2005–2016 jibx.org. All rights reserved.