| |
|
| java.lang.Object javax.swing.tree.DefaultMutableTreeNode javaparser.ParserTreeNode
All known Subclasses: javaparser.FieldNode, javaparser.MethodNode, javaparser.StaticInitializerNode, javaparser.AnnotationMemberNode, javaparser.EnumConstantNode, javaparser.TypeNode, javaparser.MainNode, javaparser.ImportNode, javaparser.ConstructorNode,
ParserTreeNode | public class ParserTreeNode extends DefaultMutableTreeNode implements Comparable<ParserTreeNode>(Code) | | Used to build the syntax tree over the tokens directly from the parser in the ParserOutputProcessor.
Also used for the simplified tree (syntax tree displayed to the user)
( often several 10MB in memory)
TODO: use a 100% NON UI treenode instead of DefaultMutableTreeNode.
and create later the DefaultMutableTreeNode.
=> also create a pool of reusable nodes !
=> separate raw parser and tree representation...
|
Constructor Summary | |
public | ParserTreeNode(String name) Used for compound nodes (non leafs) and parsed simplified ones. | public | ParserTreeNode(Token t) Contains a single terminal non null token (leaf)
(is only called during the raw tree construction). |
created | public static volatile int created(Code) | | |
expandInView | public boolean expandInView(Code) | | |
isRawTreeRoot | public boolean isRawTreeRoot(Code) | | |
isterminated | public boolean isterminated(Code) | | |
sortPriority | protected int sortPriority(Code) | | field 0,
method 1,
constructor 2
enum 3
class 4
annotation 5 (type def)
static init 6
|
terminated | public static volatile int terminated(Code) | | |
ParserTreeNode | public ParserTreeNode(String name)(Code) | | Used for compound nodes (non leafs) and parsed simplified ones.
May contain a list of tokens.
|
ParserTreeNode | public ParserTreeNode(Token t)(Code) | | Contains a single terminal non null token (leaf)
(is only called during the raw tree construction).
|
getEndLinCol | public int[] getEndLinCol()(Code) | | |
getStartLinCol | public int[] getStartLinCol()(Code) | | |
getTokenKind | public int getTokenKind()(Code) | | -1 if not a token
|
isToken | public boolean isToken()(Code) | | |
setEnd | public void setEnd(int line, int col)(Code) | | |
setStart | public void setStart(int line, int col)(Code) | | |
setStartPosFrom | public void setStartPosFrom(Token t)(Code) | | |
takeBoundsFrom | public void takeBoundsFrom(ParserTreeNode n)(Code) | | Used in the parse fro errors when one create new warning nodes and
wants that they have the same start and end as some target
|
terminate | public void terminate()(Code) | | Call this to help the GC !
Removes itself from parent. (IMPORTANT).
Overriders MUST call super.terminate()!
|
toString | public String toString()(Code) | | Used in the tree as text representation
|
|
|
|