Package edu.umd.cs.findbugs.ba
Class ReturnPathAnalysis
java.lang.Object
edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis<Fact>
edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis<Fact>
edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis<ReturnPath>
edu.umd.cs.findbugs.ba.ReturnPathAnalysis
- All Implemented Interfaces:
DataflowAnalysis<ReturnPath>
,EdgeTypes
-
Field Summary
Fields inherited from interface edu.umd.cs.findbugs.ba.EdgeTypes
BACKEDGE_SOURCE_EDGE, BACKEDGE_TARGET_EDGE, CHECKED_EXCEPTIONS_FLAG, EXIT_EDGE, EXPLICIT_EXCEPTIONS_FLAG, FALL_THROUGH_EDGE, GOTO_EDGE, HANDLED_EXCEPTION_EDGE, IFCMP_EDGE, JSR_EDGE, RET_EDGE, RETURN_EDGE, START_EDGE, SWITCH_DEFAULT_EDGE, SWITCH_EDGE, UNHANDLED_EXCEPTION_EDGE, UNKNOWN_EDGE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(ReturnPath source, ReturnPath dest) Copy dataflow facts.Create empty (uninitialized) dataflow facts for one program point.void
initEntryFact
(ReturnPath fact) Initialize the "entry" fact for the graph.boolean
isFactValid
(ReturnPath fact) Determine whether the given fact is valid (neither top nor bottom).boolean
isTop
(ReturnPath fact) Is the given fact the top value.void
makeFactTop
(ReturnPath fact) Make given fact the top value.void
meetInto
(ReturnPath fact, Edge edge, ReturnPath result) Meet a dataflow fact associated with an incoming edge into another fact.boolean
same
(ReturnPath fact1, ReturnPath fact2) Are given dataflow facts the same?void
transferInstruction
(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, ReturnPath fact) Transfer function for a single instruction.Methods inherited from class edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis
getBlockOrder, getDepthFirstSearch, isForwards
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis
getFactAfterLocation, getFactAtLocation, transfer
Methods inherited from class edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis
edgeTransfer, factToString, finishIteration, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIteration
-
Constructor Details
-
ReturnPathAnalysis
-
-
Method Details
-
createFact
Description copied from interface:DataflowAnalysis
Create empty (uninitialized) dataflow facts for one program point. A valid value will be copied into it before it is used.- Specified by:
createFact
in interfaceDataflowAnalysis<ReturnPath>
-
copy
Description copied from interface:DataflowAnalysis
Copy dataflow facts.- Specified by:
copy
in interfaceDataflowAnalysis<ReturnPath>
-
initEntryFact
Description copied from interface:DataflowAnalysis
Initialize the "entry" fact for the graph.- Specified by:
initEntryFact
in interfaceDataflowAnalysis<ReturnPath>
-
makeFactTop
Description copied from interface:DataflowAnalysis
Make given fact the top value.- Specified by:
makeFactTop
in interfaceDataflowAnalysis<ReturnPath>
-
isTop
Description copied from interface:DataflowAnalysis
Is the given fact the top value.- Specified by:
isTop
in interfaceDataflowAnalysis<ReturnPath>
-
same
Description copied from interface:DataflowAnalysis
Are given dataflow facts the same?- Specified by:
same
in interfaceDataflowAnalysis<ReturnPath>
-
transferInstruction
public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, ReturnPath fact) throws DataflowAnalysisException Description copied from class:AbstractDataflowAnalysis
Transfer function for a single instruction.- Specified by:
transferInstruction
in classAbstractDataflowAnalysis<ReturnPath>
- Parameters:
handle
- the instructionbasicBlock
- the BasicBlock containing the instruction; needed to disambiguate instructions in inlined JSR subroutinesfact
- which should be modified based on the instruction- Throws:
DataflowAnalysisException
-
isFactValid
Description copied from class:AbstractDataflowAnalysis
Determine whether the given fact is valid (neither top nor bottom).- Specified by:
isFactValid
in classAbstractDataflowAnalysis<ReturnPath>
-
meetInto
public void meetInto(ReturnPath fact, Edge edge, ReturnPath result) throws DataflowAnalysisException Description copied from interface:DataflowAnalysis
Meet a dataflow fact associated with an incoming edge into another fact. This is used to determine the start fact for a basic block.- Specified by:
meetInto
in interfaceDataflowAnalysis<ReturnPath>
- Parameters:
fact
- the predecessor fact (incoming edge)edge
- the edge from the predecessorresult
- the result fact- Throws:
DataflowAnalysisException
-