| java.lang.Object net.sourceforge.jrefactory.ast.SimpleNode
All known Subclasses: net.sourceforge.jrefactory.ast.ASTShiftExpression, net.sourceforge.jrefactory.ast.ASTInterfaceBody, net.sourceforge.jrefactory.ast.ASTLocalVariableDeclaration, net.sourceforge.jrefactory.ast.ASTAnnotation, net.sourceforge.jrefactory.ast.ASTJSPBody, net.sourceforge.jrefactory.ast.ASTArrayDimsAndInits, net.sourceforge.jrefactory.ast.ASTAllocationExpression, net.sourceforge.jrefactory.ast.ASTPreDecrementExpression, net.sourceforge.jrefactory.ast.ASTActualTypeArgument, net.sourceforge.jrefactory.ast.ASTBlock, net.sourceforge.jrefactory.ast.ASTInterfaceMemberDeclaration, net.sourceforge.jrefactory.ast.ASTForUpdate, net.sourceforge.jrefactory.ast.ASTVariableDeclaratorId, net.sourceforge.jrefactory.ast.ASTTypeParameterList, net.sourceforge.jrefactory.ast.ASTConditionalOrExpression, net.sourceforge.jrefactory.ast.ASTAssertionStatement, net.sourceforge.jrefactory.ast.ASTAndExpression, net.sourceforge.jrefactory.ast.AccessNode, net.sourceforge.jrefactory.ast.NamedNode, net.sourceforge.jrefactory.ast.ASTBlockStatement, net.sourceforge.jrefactory.ast.ASTVariableDeclarator, net.sourceforge.jrefactory.ast.ASTSwitchLabel, net.sourceforge.jrefactory.ast.ASTCastExpression, net.sourceforge.jrefactory.ast.ASTClassBody, net.sourceforge.jrefactory.ast.ASTAdditiveExpression, net.sourceforge.jrefactory.ast.ASTMemberValue, net.sourceforge.jrefactory.ast.ASTTypeDeclaration, net.sourceforge.jrefactory.ast.ASTStatementExpressionList, net.sourceforge.jrefactory.ast.ASTIfStatement, net.sourceforge.jrefactory.ast.ASTEqualityExpression, net.sourceforge.jrefactory.ast.ASTArrayInitializer, net.sourceforge.jrefactory.ast.ASTTypeArguments, net.sourceforge.jrefactory.ast.ASTResultType, net.sourceforge.jrefactory.ast.ASTDoStatement, net.sourceforge.jrefactory.ast.ASTArgumentList, net.sourceforge.jrefactory.ast.ASTInitializer, net.sourceforge.jrefactory.ast.ASTReferenceTypeList, net.sourceforge.jrefactory.ast.ASTPrimaryExpression, net.sourceforge.jrefactory.ast.ASTFormalParameter, net.sourceforge.jrefactory.ast.ASTThrowStatement, net.sourceforge.jrefactory.ast.ASTForInit, net.sourceforge.jrefactory.ast.ASTForStatement, net.sourceforge.jrefactory.ast.ASTMemberValueArrayInitializer, net.sourceforge.jrefactory.ast.ASTName, net.sourceforge.jrefactory.ast.ASTWhileStatement, net.sourceforge.jrefactory.ast.ASTReturnStatement, net.sourceforge.jrefactory.ast.ASTSynchronizedStatement, net.sourceforge.jrefactory.ast.ASTPreIncrementExpression, net.sourceforge.jrefactory.ast.ASTExpression, net.sourceforge.jrefactory.ast.ASTNameList, net.sourceforge.jrefactory.ast.ASTImportDeclaration, net.sourceforge.jrefactory.ast.ASTTryStatement, net.sourceforge.jrefactory.ast.ASTMultiplicativeExpression, net.sourceforge.jrefactory.ast.ASTEmptyStatement, net.sourceforge.jrefactory.ast.ASTType, net.sourceforge.jrefactory.ast.ASTSwitchStatement, net.sourceforge.jrefactory.ast.ASTNullLiteral, net.sourceforge.jrefactory.ast.ASTInclusiveOrExpression, net.sourceforge.jrefactory.ast.ASTPackageDeclaration, net.sourceforge.jrefactory.ast.ASTTypeParameters, net.sourceforge.jrefactory.ast.ASTConditionalAndExpression, net.sourceforge.jrefactory.ast.ASTMemberValuePairs, net.sourceforge.jrefactory.ast.ASTRelationalExpression, net.sourceforge.jrefactory.ast.ASTInstanceOfExpression, net.sourceforge.jrefactory.ast.ASTArguments, net.sourceforge.jrefactory.ast.ASTFormalParameters, net.sourceforge.jrefactory.ast.ASTExclusiveOrExpression, net.sourceforge.jrefactory.ast.ASTVariableInitializer, net.sourceforge.jrefactory.ast.ASTStatement, net.sourceforge.jrefactory.ast.ASTCompilationUnit, net.sourceforge.jrefactory.ast.ASTConditionalExpression, net.sourceforge.jrefactory.ast.ASTMemberValuePair, net.sourceforge.jrefactory.ast.ASTClassBodyDeclaration,
SimpleNode | public class SimpleNode implements Node(Code) | | This object is the base class for all items in the AST (abstract syntax tree).
author: Mike Atkinson since: jRefactory 2.9.0, created October 16, 2003 |
Method Summary | |
public void | addSpecial(String key, Token value) | public Object | childrenAccept(JavaParserVisitor visitor, Object data) Accept the visitor. | public void | dump(String prefix) Dump the node data (including the special tokens) to System.err
Override this method if you want to customize how the node dumps
out its children. | public String | dumpString(String prefix) Dump the node data (including the special tokens) to a String. | public List | findChildrenOfType(Class targetType) | public void | findChildrenOfType(Class targetType, List results) | public void | findChildrenOfType(Class targetType, List results, boolean descendIntoNestedClasses) | public int | getBeginColumn() | public int | getBeginLine() | public int | getEndColumn() | public int | getEndLine() | public String | getImage() | public String | getName() | public Scope | getScope() | public Token | getSpecial(String key) | public boolean | hasAnyChildren() | protected void | init() | public boolean | isRequired() | public Object | jjtAccept(JavaParserVisitor visitor, Object data) Accept the visitor. | public void | jjtAddChild(Node n, int i) | public void | jjtAddFirstChild(Node n) | public void | jjtClose() | public void | jjtDeleteChild(int i) | public Node | jjtGetChild(int i) | public Node | jjtGetFirstChild() This method returns a child node. | public int | jjtGetID() | public int | jjtGetNumChildren() | public Node | jjtGetParent() | public void | jjtInsertChild(Node n, int i) | public void | jjtOpen() | public void | jjtSetParent(Node n) | protected String | printModifiers() | public void | removeSpecial(String key) | public void | setLineAndColumnInfo(int beginLine, int beginColumn, int endLine, int endColumn) | public void | setScope(Scope scope) | public void | testingOnly__setBeginColumn(int i) | public void | testingOnly__setBeginLine(int i) | public String | toString() You can override these two methods in subclasses of SimpleNode to
customize the way the node appears when the tree is dumped. | public String | toString(String prefix) You can override these two methods in subclasses of SimpleNode to
customize the way the node appears when the tree is dumped. |
children | protected Node[] children(Code) | | Description of the Field
|
id | protected int id(Code) | | Description of the Field
|
parent | protected Node parent(Code) | | Description of the Field
|
specials | public Vector specials(Code) | | Description of the Field
|
SimpleNode | public SimpleNode(int i)(Code) | | Constructor for the SimpleNode object
Parameters: i - Description of Parameter |
SimpleNode | public SimpleNode(JavaParser parser, int i)(Code) | | Constructor for the SimpleNode object
Parameters: parser - Description of Parameter Parameters: i - Description of Parameter |
addSpecial | public void addSpecial(String key, Token value)(Code) | | Description of the Method
Parameters: key - Description of Parameter Parameters: value - Description of Parameter |
childrenAccept | public Object childrenAccept(JavaParserVisitor visitor, Object data)(Code) | | Accept the visitor.
Parameters: visitor - Description of Parameter Parameters: data - Description of Parameter Description of the Returned Value |
dump | public void dump(String prefix)(Code) | | Dump the node data (including the special tokens) to System.err
Override this method if you want to customize how the node dumps
out its children.
Parameters: prefix - prefixed to every line of the output |
dumpString | public String dumpString(String prefix)(Code) | | Dump the node data (including the special tokens) to a String.
Parameters: prefix - prefixed to every line of the output dump of the Node data. since: JRefactory 2.7.00 |
findChildrenOfType | public List findChildrenOfType(Class targetType)(Code) | | Description of the Method
Parameters: targetType - Description of the Parameter Description of the Return Value |
findChildrenOfType | public void findChildrenOfType(Class targetType, List results)(Code) | | Description of the Method
Parameters: targetType - Description of the Parameter Parameters: results - Description of the Parameter |
findChildrenOfType | public void findChildrenOfType(Class targetType, List results, boolean descendIntoNestedClasses)(Code) | | Description of the Method
Parameters: targetType - Description of the Parameter Parameters: results - Description of the Parameter Parameters: descendIntoNestedClasses - Description of the Parameter |
getBeginColumn | public int getBeginColumn()(Code) | | Gets the beginColumn attribute of the SimpleNode object
The beginColumn value |
getBeginLine | public int getBeginLine()(Code) | | Gets the beginLine attribute of the SimpleNode object
The beginLine value |
getEndColumn | public int getEndColumn()(Code) | | Gets the endColumn attribute of the SimpleNode object
The endColumn value |
getEndLine | public int getEndLine()(Code) | | Gets the endLine attribute of the SimpleNode object
The endLine value |
getImage | public String getImage()(Code) | | Gets the image attribute of the SimpleNode object
The image value |
getName | public String getName()(Code) | | Gets the name attribute of the SimpleNode object
The name value |
getScope | public Scope getScope()(Code) | | Gets the scope attribute of the SimpleNode object
The scope value |
getSpecial | public Token getSpecial(String key)(Code) | | Gets the special associated with a particular key
Parameters: key - the key the value |
hasAnyChildren | public boolean hasAnyChildren()(Code) | | Description of the Method
Description of the Returned Value |
init | protected void init()(Code) | | Initializes any variables that are not required
|
isRequired | public boolean isRequired()(Code) | | Is javadoc required?
The required value |
jjtAccept | public Object jjtAccept(JavaParserVisitor visitor, Object data)(Code) | | Accept the visitor.
Parameters: visitor - Description of Parameter Parameters: data - Description of Parameter Description of the Returned Value |
jjtAddChild | public void jjtAddChild(Node n, int i)(Code) | | Description of the Method
Parameters: n - Description of Parameter Parameters: i - Description of Parameter |
jjtAddFirstChild | public void jjtAddFirstChild(Node n)(Code) | | Description of the Method
Parameters: n - Description of Parameter |
jjtClose | public void jjtClose()(Code) | | Description of the Method
|
jjtDeleteChild | public void jjtDeleteChild(int i)(Code) | | Remove the node numbered i
Parameters: i - The index of the node to remove |
jjtGetChild | public Node jjtGetChild(int i)(Code) | | Description of the Method
Parameters: i - Description of Parameter Description of the Returned Value |
jjtGetFirstChild | public Node jjtGetFirstChild()(Code) | | This method returns a child node. The children are numbered from zero, left to right.
Same as jjtGetFirstChild();
Description of the Returned Value |
jjtGetID | public int jjtGetID()(Code) | | Return the id for this node
the id |
jjtGetNumChildren | public int jjtGetNumChildren()(Code) | | Description of the Method
Description of the Returned Value |
jjtGetParent | public Node jjtGetParent()(Code) | | Description of the Method
Description of the Returned Value |
jjtInsertChild | public void jjtInsertChild(Node n, int i)(Code) | | Insert the node numbered i
Parameters: n - Description of Parameter Parameters: i - The index of the node to remove |
jjtOpen | public void jjtOpen()(Code) | | Description of the Method
|
jjtSetParent | public void jjtSetParent(Node n)(Code) | | Description of the Method
Parameters: n - Description of Parameter |
printModifiers | protected String printModifiers()(Code) | | Description of the Method
Description of the Returned Value |
removeSpecial | public void removeSpecial(String key)(Code) | | Removes a special associated with a key
Parameters: key - the special to remove |
setLineAndColumnInfo | public void setLineAndColumnInfo(int beginLine, int beginColumn, int endLine, int endColumn)(Code) | | |
setScope | public void setScope(Scope scope)(Code) | | Sets the scope attribute of the SimpleNode object
Parameters: scope - The new scope value |
testingOnly__setBeginColumn | public void testingOnly__setBeginColumn(int i)(Code) | | A unit test for JUnit
Parameters: i - Description of Parameter |
testingOnly__setBeginLine | public void testingOnly__setBeginLine(int i)(Code) | | A unit test for JUnit
Parameters: i - Description of Parameter |
toString | public String toString()(Code) | | You can override these two methods in subclasses of SimpleNode to
customize the way the node appears when the tree is dumped. If
your output uses more than one line you should override
toString(String), otherwise overriding toString() is probably all
you need to do.
Description of the Returned Value |
toString | public String toString(String prefix)(Code) | | You can override these two methods in subclasses of SimpleNode to
customize the way the node appears when the tree is dumped. If
your output uses more than one line you should override
toString(String), otherwise overriding toString() is probably all
you need to do.
Parameters: prefix - Description of Parameter Description of the Returned Value |
|
|