|
||||||||||
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.DeclCollector
public class DeclCollector
DeclCollector
defines methods for collecting all referred
PDecl
nodes in the subtree of an AST node or in the subtrees of nodes
associated with points in a control flow graph.
Constructor Summary | |
---|---|
DeclCollector()
|
Method Summary | |
---|---|
void |
caseTIdentifier(TIdentifier node)
Adds PDecl instances of node.decl to the collection. |
static Collection<PDecl> |
collectDecls(Collection<IProgramPoint> points)
Collects all PDecl nodes referred to in the subtrees of nodes
associated with the program points in the set of points . |
static Collection<PDecl> |
collectDecls(ICFG cfg)
Collects all PDecl nodes referred to in the subtrees of nodes
associated with the program points in the control flow graph cfg . |
static Collection<PDecl> |
collectDecls(Node node)
Collects all PDecl nodes referred to in the subtree of node . |
void |
defaultInPDecl(PDecl node)
Adds the PDecl node to the collection. |
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 DeclCollector()
Method Detail |
---|
public void caseTIdentifier(TIdentifier node)
PDecl
instances of node.decl
to the collection.
caseTIdentifier
in interface Analysis
caseTIdentifier
in class AnalysisAdapter
node
- the visited TIdentifier
public void defaultInPDecl(PDecl node)
PDecl
node
to the collection.
defaultInPDecl
in class DepthFirstAdapter
node
- the visited PDecl
public static Collection<PDecl> collectDecls(Node node)
PDecl
nodes referred to in the subtree of node
.
node
- the node where the collection starts
PDecl
nodespublic static Collection<PDecl> collectDecls(Collection<IProgramPoint> points)
PDecl
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
PDecl
nodespublic static Collection<PDecl> collectDecls(ICFG cfg)
PDecl
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
PDecl
nodes
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |