|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis<ReturnPathType>
edu.umd.cs.findbugs.ba.npe.ReturnPathTypeAnalysis
public class ReturnPathTypeAnalysis
A dataflow analysis to determine, at each location in a method's CFG, whether or not it is possible to return normally at that location.
Constructor Summary | |
---|---|
ReturnPathTypeAnalysis(CFG cfg,
ReverseDepthFirstSearch rdfs,
DepthFirstSearch dfs)
Constructor. |
Method Summary | |
---|---|
void |
copy(ReturnPathType source,
ReturnPathType dest)
Copy dataflow facts. |
ReturnPathType |
createFact()
Create empty (uninitialized) dataflow facts for one program point. |
void |
edgeTransfer(Edge edge,
ReturnPathType fact)
Edge transfer function. |
void |
finishIteration()
Called after finishing an iteration of analysis. |
BlockOrder |
getBlockOrder(CFG cfg)
Return the BlockOrder specifying the order in which BasicBlocks should be visited in the main dataflow loop. |
int |
getLastUpdateTimestamp(ReturnPathType fact)
|
void |
initEntryFact(ReturnPathType result)
Initialize the "entry" fact for the graph. |
boolean |
isForwards()
Returns true if the analysis is forwards, false if backwards. |
boolean |
isTop(ReturnPathType fact)
Is the given fact the top value. |
void |
makeFactTop(ReturnPathType fact)
Make given fact the top value. |
void |
meetInto(ReturnPathType fact,
Edge edge,
ReturnPathType result)
Meet a dataflow fact associated with an incoming edge into another fact. |
boolean |
same(ReturnPathType fact1,
ReturnPathType fact2)
Are given dataflow facts the same? |
void |
setLastUpdateTimestamp(ReturnPathType fact,
int timestamp)
|
void |
startIteration()
Called before beginning an iteration of analysis. |
void |
transfer(BasicBlock basicBlock,
org.apache.bcel.generic.InstructionHandle end,
ReturnPathType start,
ReturnPathType result)
Transfer function for the analysis. |
Methods inherited from class edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis |
---|
factToString, getFactAfterLocation, getFactAtLocation, getFactOnEdge, getResultFact, getStartFact, resultFactIterator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReturnPathTypeAnalysis(CFG cfg, ReverseDepthFirstSearch rdfs, DepthFirstSearch dfs)
cfg
- the method's CFGrdfs
- a ReverseDepthFirstSearch on the method's CFGdfs
- a DepthFirstSearch on the method's CFGMethod Detail |
---|
public void copy(ReturnPathType source, ReturnPathType dest)
DataflowAnalysis
public ReturnPathType createFact()
DataflowAnalysis
public void edgeTransfer(Edge edge, ReturnPathType fact)
DataflowAnalysis
A do-nothing implementation is legal, and appropriate for analyses where branches are not significant.
edgeTransfer
in interface DataflowAnalysis<ReturnPathType>
edgeTransfer
in class BasicAbstractDataflowAnalysis<ReturnPathType>
edge
- the Edgefact
- a dataflow factpublic void finishIteration()
DataflowAnalysis
finishIteration
in interface DataflowAnalysis<ReturnPathType>
finishIteration
in class BasicAbstractDataflowAnalysis<ReturnPathType>
public BlockOrder getBlockOrder(CFG cfg)
DataflowAnalysis
cfg
- the CFG upon which we're performing dataflow analysispublic int getLastUpdateTimestamp(ReturnPathType fact)
getLastUpdateTimestamp
in interface DataflowAnalysis<ReturnPathType>
getLastUpdateTimestamp
in class BasicAbstractDataflowAnalysis<ReturnPathType>
public void initEntryFact(ReturnPathType result) throws DataflowAnalysisException
DataflowAnalysis
DataflowAnalysisException
public boolean isForwards()
DataflowAnalysis
public boolean isTop(ReturnPathType fact)
DataflowAnalysis
public void makeFactTop(ReturnPathType fact)
DataflowAnalysis
public void meetInto(ReturnPathType fact, Edge edge, ReturnPathType result) throws DataflowAnalysisException
DataflowAnalysis
fact
- the predecessor fact (incoming edge)edge
- the edge from the predecessorresult
- the result fact
DataflowAnalysisException
public boolean same(ReturnPathType fact1, ReturnPathType fact2)
DataflowAnalysis
public void setLastUpdateTimestamp(ReturnPathType fact, int timestamp)
setLastUpdateTimestamp
in interface DataflowAnalysis<ReturnPathType>
setLastUpdateTimestamp
in class BasicAbstractDataflowAnalysis<ReturnPathType>
public void startIteration()
DataflowAnalysis
startIteration
in interface DataflowAnalysis<ReturnPathType>
startIteration
in class BasicAbstractDataflowAnalysis<ReturnPathType>
public void transfer(BasicBlock basicBlock, org.apache.bcel.generic.InstructionHandle end, ReturnPathType start, ReturnPathType result) throws DataflowAnalysisException
DataflowAnalysis
basicBlock
- the basic blockend
- if nonnull, stop before considering this instruction;
otherwise, consider all of the instructions in the basic blockstart
- dataflow facts at beginning of block (if forward analysis)
or end of block (if backwards analysis)result
- resulting dataflow facts at other end of block
DataflowAnalysisException
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |