|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttip.analysis.AnalysisAdapter
tip.analysis.DepthFirstAdapter
tip.util.LocalDeclCollector
public class LocalDeclCollector
LocalDeclCollector
defines methods for collecting all referred
ALocalDecl
nodes in the subtree of an AST node or in the subtrees of
nodes associated with points in a control flow graph.
Constructor Summary | |
---|---|
LocalDeclCollector()
|
Method Summary | |
---|---|
void |
caseALocalDecl(ALocalDecl node)
Adds the ALocalDecl node to the collection. |
void |
caseTIdentifier(TIdentifier node)
Adds ALocalDecl instances of node.decl to the collection. |
static Collection<ALocalDecl> |
collectLocalDecls(Collection<IProgramPoint> points)
Collects all ALocalDecl nodes referred to in the subtrees of
nodes associated with the program points in the set of points . |
static Collection<ALocalDecl> |
collectLocalDecls(ICFG cfg)
Collects all ALocalDecl nodes referred to in the subtrees of
nodes associated with the program points in the control flow graph
cfg . |
static Collection<ALocalDecl> |
collectLocalDecls(Node node)
Collects all ALocalDecl nodes referred to in the subtree of
node . |
Methods inherited from class tip.analysis.AnalysisAdapter |
---|
caseEOF, caseTAnd, caseTAssign, caseTComma, caseTCommentBlock, caseTCommentSingle, caseTDiv, caseTElse, caseTEq, caseTGt, caseTIf, caseTInput, caseTIntegerConst, caseTLBrace, caseTLPar, caseTMalloc, caseTMinus, caseTNull, caseTOutput, caseTPlus, caseTRBrace, caseTReturn, caseTRPar, caseTSemicolon, caseTStar, caseTVar, caseTWhile, caseTWhiteSpace, defaultNode, defaultToken, getIn, getOut, setIn, setOut |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalDeclCollector()
Method Detail |
---|
public void caseTIdentifier(TIdentifier node)
ALocalDecl
instances of node.decl
to the collection.
caseTIdentifier
in interface Analysis
caseTIdentifier
in class AnalysisAdapter
node
- the visited TIdentifier
public void caseALocalDecl(ALocalDecl node)
ALocalDecl
node
to the collection.
caseALocalDecl
in interface Analysis
caseALocalDecl
in class DepthFirstAdapter
node
- the visited ALocalDecl
public static Collection<ALocalDecl> collectLocalDecls(Node node)
ALocalDecl
nodes referred to in the subtree of
node
.
node
- the node where the collection starts
ALocalDecl
nodespublic static Collection<ALocalDecl> collectLocalDecls(Collection<IProgramPoint> points)
ALocalDecl
nodes referred to in the subtrees of
nodes associated with the program points in the set of points
.
points
- the set of program points investigated
ALocalDecl
nodespublic static Collection<ALocalDecl> collectLocalDecls(ICFG cfg)
ALocalDecl
nodes referred to in the subtrees of
nodes associated with the program points in the control flow graph
cfg
.
cfg
- the investigated control flow graph
ALocalDecl
nodes
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |