public abstract class NestedBase extends BindingBuilder.ContainerBase implements IComponent, IContainer
Modifier and Type | Field and Description |
---|---|
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_isFlexible
Flag for flexible element handling (used by subclasses).
|
protected boolean |
m_isOrdered
Flag for ordered child content (used by subclasses).
|
m_accessLevel, m_autoLink, m_container, m_nameStyle, m_stripPrefix, m_stripSuffix, m_styleDefault
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.
|
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.
|
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.
|
getStyleDefault, unmarshal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentUnmarshal, genLoadId, genNewInstance, hasAttribute, hasId, print
setLinkages
getStyleDefault
private IContextObj m_contextObject
private final boolean m_hasContext
protected final boolean m_isOrdered
protected final boolean m_isFlexible
private final DefinitionContext m_defContext
protected java.util.ArrayList m_attributes
protected java.util.ArrayList m_contents
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 java.util.ArrayList getAttributes()
null
if none; should not
be modified)public java.util.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()
IContainer
isContentOrdered
in interface IContainer
true
if ordered, false
if notpublic boolean hasNamespaces()
public BindingDefinition getBindingRoot()
IContainer
getBindingRoot
in interface IContainer
public DefinitionContext getDefinitionContext()
IContainer
getDefinitionContext
in interface IContainer
public boolean isOptional()
IComponent
isOptional
in interface IComponent
true
if optional, false
if requiredpublic boolean hasContent()
IComponent
ILinkable.setLinkages()
.hasContent
in interface IComponent
true
if one or more content values defined
for containing element, false
if notpublic void genContentPresentTest(ContextMethodBuilder mb) throws JiBXException
IComponent
genContentPresentTest
in interface IComponent
mb
- method builderJiBXException
- if configuration errorpublic java.lang.String getType()
IComponent
getType
in interface IComponent
public NameDefinition getWrapperName()
IComponent
getWrapperName
in interface IComponent
null
if no wrapper element