|
|||||||||
| Home >> All >> com >> puppycrawl >> tools >> checkstyle >> checks >> usage >> [ transmogrify overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.puppycrawl.tools.checkstyle.checks.usage.transmogrify
Class SymTabAST

java.lang.Objectantlr.BaseAST
antlr.CommonAST
antlr.CommonASTWithHiddenTokens
com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.SymTabAST
- All Implemented Interfaces:
- antlr.collections.AST, java.io.Serializable
- public class SymTabAST
- extends antlr.CommonASTWithHiddenTokens
an extension of antlr.CommonAST that includes
extra information about the AST's location. This information
is the file and line number where the AST was created.
To use this AST node in your tree structure, assuming your
antlr.TreeParser is called parser, use
parser.setASTNOdeCLass(SymTabAST.class.getName());
make sure you also call setTokenObjectClass for the lexer as well
| Field Summary | |
private int |
_column
|
private IDefinition |
_definition
|
private java.io.File |
_file
|
private boolean |
_isMeaningful
|
private int |
_line
|
private Scope |
_scope
|
private Span |
_span
|
private com.puppycrawl.tools.checkstyle.api.DetailAST |
detailNode
original syntax tree node |
| Fields inherited from class antlr.CommonASTWithHiddenTokens |
hiddenAfter, hiddenBefore |
| Fields inherited from class antlr.CommonAST |
|
| Fields inherited from class antlr.BaseAST |
down, right |
| Constructor Summary | |
SymTabAST()
|
|
| Method Summary | |
SymTabAST |
findFirstToken(int type)
Gets first occurence of the child node with a certain type |
Span |
finishChildren(java.io.File file)
finishes children of this node definition process |
Span |
finishDefinition(java.io.File file,
SymTabAST parent)
finishes process for adding node to its parent |
SymTabASTIterator |
getChildren()
Gets Iterator for this node |
int |
getColumnNo()
gets the column where this node reside |
IDefinition |
getDefinition()
gets _definitin |
com.puppycrawl.tools.checkstyle.api.DetailAST |
getDetailNode()
Returns the DetailAST associated with this node. |
SymTabAST |
getEnclosingNode(int line,
int column)
gets enclosing node for this node based on line and column |
java.io.File |
getFile()
gets file where this node belongs to |
antlr.collections.AST |
getFirstChild()
|
int |
getLineNo()
gets the line where this node reside |
java.lang.String |
getName()
gets the definition name of this node |
antlr.collections.AST |
getNextSibling()
|
Scope |
getScope()
gets the scope of this node |
Span |
getSpan()
gets Span of this node |
void |
ignoreChildren()
sets meaningfulness for this node and its children |
void |
initialize(antlr.collections.AST aAST)
initialized this node with input node |
boolean |
isMeaningful()
tests if this node is meaningful or should be ignored |
java.lang.String |
prefixString(boolean verboseStringConversion)
|
void |
setColumn(int column)
sets the column where this node reside |
void |
setDefinition(IDefinition definition,
Scope scope)
sets Definition for this node |
void |
setDefinition(IDefinition definition,
Scope scope,
boolean createReference)
sets Definition for this node and adds Reference
to the _definition and scope |
void |
setDetailNode(com.puppycrawl.tools.checkstyle.api.DetailAST aDetailAST)
Sets the DetailAST associated with this node. |
void |
setFile(java.io.File file)
sets file where this node belong to |
void |
setLine(int line)
sets the line where this node reside |
void |
setMeaningfulness(boolean isMeaningful)
sets _isMeaningful member |
void |
setParent(SymTabAST parent)
sets parent of this node |
void |
setScope(Scope scope)
sets the scope of this node |
void |
setSpan(Span span)
sets Span for this node |
java.lang.String |
toString()
prints the line, column and file for this node for debugging purpose |
private SymTabAST |
treeCopy()
makes a new copy of the current SymTabAST. |
| Methods inherited from class antlr.CommonASTWithHiddenTokens |
getHiddenAfter, getHiddenBefore, initialize |
| Methods inherited from class antlr.CommonAST |
getText, getType, initialize, setText, setType |
| Methods inherited from class antlr.BaseAST |
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
_scope
private Scope _scope
_definition
private IDefinition _definition
_isMeaningful
private boolean _isMeaningful
_file
private java.io.File _file
_line
private int _line
_column
private int _column
_span
private Span _span
detailNode
private com.puppycrawl.tools.checkstyle.api.DetailAST detailNode
- original syntax tree node
| Constructor Detail |
SymTabAST
public SymTabAST()
| Method Detail |
setParent
public void setParent(SymTabAST parent)
- sets parent of this node
getScope
public Scope getScope()
- gets the scope of this node
setScope
public void setScope(Scope scope)
- sets the scope of this node
setDefinition
public void setDefinition(IDefinition definition, Scope scope)
- sets
Definitionfor this node
setDefinition
public void setDefinition(IDefinition definition, Scope scope, boolean createReference)
- sets
Definitionfor this node and addsReferenceto the_definitionandscope
getDefinition
public IDefinition getDefinition()
- gets
_definitin
isMeaningful
public boolean isMeaningful()
- tests if this node is meaningful or should be ignored
setMeaningfulness
public void setMeaningfulness(boolean isMeaningful)
- sets
_isMeaningfulmember
ignoreChildren
public void ignoreChildren()
- sets meaningfulness for this node and its children
setFile
public void setFile(java.io.File file)
- sets file where this node belong to
finishDefinition
public Span finishDefinition(java.io.File file, SymTabAST parent)
- finishes process for adding node to its parent
finishChildren
public Span finishChildren(java.io.File file)
- finishes children of this node definition process
getFile
public java.io.File getFile()
- gets file where this node belongs to
setLine
public void setLine(int line)
- sets the line where this node reside
getLineNo
public int getLineNo()
- gets the line where this node reside
setColumn
public void setColumn(int column)
- sets the column where this node reside
getColumnNo
public int getColumnNo()
- gets the column where this node reside
getName
public java.lang.String getName()
- gets the definition name of this node
treeCopy
private SymTabAST treeCopy()
- makes a new copy of the current
SymTabAST. Uses the initialize(AST t) method to copy properties for each cloned node.
toString
public java.lang.String toString()
- prints the line, column and file for this node for debugging purpose
prefixString
public java.lang.String prefixString(boolean verboseStringConversion)
getSpan
public Span getSpan()
- gets
Spanof this node
setSpan
public void setSpan(Span span)
- sets
Spanfor this node
getEnclosingNode
public SymTabAST getEnclosingNode(int line, int column)
- gets enclosing node for this node based on line and column
getFirstChild
public antlr.collections.AST getFirstChild()
getNextSibling
public antlr.collections.AST getNextSibling()
initialize
public void initialize(antlr.collections.AST aAST)
- initialized this node with input node
findFirstToken
public SymTabAST findFirstToken(int type)
- Gets first occurence of the child node with a certain type
getChildren
public SymTabASTIterator getChildren()
- Gets Iterator for this node
getDetailNode
public com.puppycrawl.tools.checkstyle.api.DetailAST getDetailNode()
- Returns the DetailAST associated with this node.
setDetailNode
public void setDetailNode(com.puppycrawl.tools.checkstyle.api.DetailAST aDetailAST)
- Sets the DetailAST associated with this node.
|
|||||||||
| Home >> All >> com >> puppycrawl >> tools >> checkstyle >> checks >> usage >> [ transmogrify overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
antlr.BaseAST