public abstract class TemplateElement extends TemplateObject implements TreeNode
Environment.getCurrentDirectiveCallPlace()
, which a published API, and thus promises backward
compatibility.Constructor and Description |
---|
TemplateElement()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Enumeration |
children()
Deprecated.
Note: For element with
#nestedBlock , this will hide the #nestedBlock when that's a
MixedContent . |
protected abstract String |
dump(boolean canonical)
Deprecated.
Brings the implementation of
getCanonicalForm() and getDescription() to a single place. |
boolean |
getAllowsChildren()
Deprecated.
Meaningless; simply returns if the node currently has any child nodes.
|
String |
getCanonicalForm()
Deprecated.
This final implementation calls
dump(false) . |
TreeNode |
getChildAt(int index)
Deprecated.
This method will return
TemplateElement starting from 2.4, as that doesn't require Swing;
don't use it. |
int |
getChildCount()
Deprecated.
|
TemplateSequenceModel |
getChildNodes()
Deprecated.
|
String |
getDescription()
Deprecated.
One-line description of the element, that contain all the information that is used in
getCanonicalForm() , except the nested content (elements) of the element. |
int |
getIndex(TreeNode node)
Deprecated.
Starting from 2.4, we won't use
TreeNode API, as it requires Swing. |
String |
getNodeName()
Deprecated.
|
String |
getNodeNamespace()
Deprecated.
|
String |
getNodeType()
Deprecated.
|
TreeNode |
getParent()
Deprecated.
This method will return
TemplateElement starting from 2.4, as that doesn't require Swing;
don't use it. |
TemplateNodeModel |
getParentNode()
Deprecated.
|
boolean |
isLeaf()
Deprecated.
|
void |
setChildAt(int index,
TemplateElement element)
Deprecated.
|
contains, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getEndLocation, getEndLocationQuoted, getSource, getStartLocation, getStartLocationQuoted, getTemplate, toString
public final String getDescription()
getCanonicalForm()
, except the nested content (elements) of the element. The expressions inside the
element (the parameters) has to be shown. Meant to be used for stack traces, also for tree views that don't go
down to the expression-level. There are no backward-compatibility guarantees regarding the format used ATM, but
it must be regular enough to be machine-parseable, and it must contain all information necessary for restoring an
AST equivalent to the original.
This final implementation calls dump(false)
.public final String getCanonicalForm()
dump(false)
.getCanonicalForm
in class TemplateObject
getDescription()
,
TemplateObject.getNodeTypeSymbol()
protected abstract String dump(boolean canonical)
getCanonicalForm()
and getDescription()
to a single place.
Don't call those methods in method on this
, because that will result in infinite recursion!canonical
- if true
, it calculates the return value of getCanonicalForm()
,
otherwise of getDescription()
.public TemplateNodeModel getParentNode()
public String getNodeNamespace()
public String getNodeType()
public TemplateSequenceModel getChildNodes()
public String getNodeName()
public boolean getAllowsChildren()
getAllowsChildren
in interface TreeNode
public int getIndex(TreeNode node)
TreeNode
API, as it requires Swing.public int getChildCount()
getChildCount
in interface TreeNode
public Enumeration children()
#nestedBlock
, this will hide the #nestedBlock
when that's a
MixedContent
.public TreeNode getChildAt(int index)
TemplateElement
starting from 2.4, as that doesn't require Swing;
don't use it.getChildAt
in interface TreeNode
public void setChildAt(int index, TemplateElement element)
public TreeNode getParent()
TemplateElement
starting from 2.4, as that doesn't require Swing;
don't use it.Copyright © 2016. All Rights Reserved.