public class TreeContext extends Object
| Constructor and Description |
|---|
TreeContext(IClassLocator iloc)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSkip(Object skip)
Add element to set to be skipped.
|
BindingElement |
getBindingRoot()
Get root element of binding.
|
TreeContext |
getChildContext()
Get a secondary context for the same tree as this instance.
|
IClass |
getClassInfo(String name)
Get class information.
|
ContainerElementBase |
getContextObject()
Get parent container with linked object.
|
DefinitionContext |
getCurrentDefinitions()
Get definition context for innermost nesting element.
|
DefinitionContext |
getDefinitions()
Get innermost containing definition context.
|
DefinitionContext |
getFormatDefinitions()
Get definition context for innermost nesting element for use by a
format (or namespace).
|
int |
getNestingDepth()
Get depth of nesting in binding.
|
ContainerElementBase |
getParentContainer()
Get parent container information.
|
NestingElementBase |
getParentElement()
Get containing element.
|
ElementBase |
getParentElement(int level)
Get containing element at generation level.
|
IClass |
getRequiredClassInfo(String name)
Get required class information.
|
boolean |
isInBinding()
Check if binding supports input.
|
boolean |
isLookupSupported()
Check if class lookup is supported.
|
boolean |
isOutBinding()
Check if binding supports output.
|
boolean |
isSkipped(Object obj)
Check if a component is being skipped due to a fatal error.
|
protected ElementBase |
peekElement()
Peek current element of hierarchy.
|
ElementBase |
popNode()
Pop node from tree.
|
void |
pushNode(ElementBase node)
Push node on tree.
|
void |
setBindingRoot(BindingElement root)
Set root element of binding.
|
void |
setGlobalDefinitions(DefinitionContext dctx)
Set the global definition context.
|
void |
tourTree(BindingElement root,
ModelVisitor visitor)
Tour complete binding model tree.
|
void |
tourTree(ElementBase root,
ModelVisitor visitor)
Tour binding model tree.
|
public TreeContext(IClassLocator iloc)
iloc - class locator to be usedpublic TreeContext getChildContext()
public void setGlobalDefinitions(DefinitionContext dctx)
dctx - global definition contextpublic void tourTree(BindingElement root, ModelVisitor visitor)
root - binding element root of treevisitor - target visitor for element notificationspublic void tourTree(ElementBase root, ModelVisitor visitor)
root - node of tree to be touredvisitor - target visitor for element notificationspublic int getNestingDepth()
protected ElementBase peekElement()
public boolean isSkipped(Object obj)
obj - component to be checkedprotected void addSkip(Object skip)
skip - Element to be skippedpublic BindingElement getBindingRoot()
IllegalStateException - if no root element knownpublic void setBindingRoot(BindingElement root)
root - root element of bindingpublic NestingElementBase getParentElement()
1 parent, except that it checks for the case where there's
no parent present.null if no parentpublic ElementBase getParentElement(int level)
NestingElementBase.level - generation level of parentpublic ContainerElementBase getParentContainer()
public ContainerElementBase getContextObject()
public boolean isInBinding()
true if input binding, false if notpublic boolean isOutBinding()
true if output binding, false if notpublic DefinitionContext getDefinitions()
public DefinitionContext getCurrentDefinitions()
public DefinitionContext getFormatDefinitions()
public boolean isLookupSupported()
false,
lookup methods return only place holder class information.true if class lookup supported, false
if only place holder information returnedpublic IClass getClassInfo(String name)
name - fully-qualified name of class to be foundnull if class not foundpublic IClass getRequiredClassInfo(String name)
name - fully-qualified name of class to be foundpublic void pushNode(ElementBase node)
node - Element Basepublic ElementBase popNode()
Copyright © 2005–2016 jibx.org. All rights reserved.