@ParametersAreNonnullByDefault public class ResourceValueAnalysis<Resource> extends FrameDataflowAnalysis<ResourceValue,ResourceValueFrame> implements 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 and Description |
---|
ResourceValueAnalysis(org.apache.bcel.generic.MethodGen methodGen,
CFG cfg,
DepthFirstSearch dfs,
ResourceTracker<Resource> resourceTracker,
Resource resource) |
Modifier and Type | Method and Description |
---|---|
ResourceValueFrame |
createFact()
Create empty (uninitialized) dataflow facts for one program point.
|
void |
initEntryFact(ResourceValueFrame result)
Initialize the "entry" fact for the graph.
|
void |
meetInto(ResourceValueFrame fact,
Edge edge,
ResourceValueFrame result)
Meet a dataflow fact associated with an incoming edge into another fact.
|
protected void |
mergeInto(ResourceValueFrame frame,
ResourceValueFrame result)
Merge one frame into another.
|
protected void |
mergeValues(ResourceValueFrame otherFrame,
ResourceValueFrame resultFrame,
int slot)
Merge the values contained in a given slot of two Frames.
|
void |
transferInstruction(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock,
ResourceValueFrame fact)
Transfer function for a single instruction.
|
copy, getFactAtPC, getFactBeforeExceptionCheck, getLastUpdateTimestamp, isFactValid, isTop, makeFactTop, modifyFrame, same, setLastUpdateTimestamp
getBlockOrder, getDepthFirstSearch, isForwards
getFactAfterLocation, getFactAtLocation, transfer
edgeTransfer, factToString, finishIteration, getFactOnEdge, getResultFact, getStartFact, resultFactIterator, startIteration
public ResourceValueAnalysis(org.apache.bcel.generic.MethodGen methodGen, CFG cfg, DepthFirstSearch dfs, ResourceTracker<Resource> resourceTracker, Resource resource)
public ResourceValueFrame createFact()
DataflowAnalysis
createFact
in interface DataflowAnalysis<ResourceValueFrame>
public void initEntryFact(ResourceValueFrame result)
DataflowAnalysis
initEntryFact
in interface DataflowAnalysis<ResourceValueFrame>
public void meetInto(ResourceValueFrame fact, Edge edge, ResourceValueFrame result) throws DataflowAnalysisException
DataflowAnalysis
meetInto
in interface DataflowAnalysis<ResourceValueFrame>
fact
- the predecessor fact (incoming edge)edge
- the edge from the predecessorresult
- the result factDataflowAnalysisException
protected void mergeInto(ResourceValueFrame frame, ResourceValueFrame result) throws DataflowAnalysisException
FrameDataflowAnalysis
mergeInto
in class FrameDataflowAnalysis<ResourceValue,ResourceValueFrame>
frame
- the frame to merge with the resultresult
- the result frame, which is modified to be the merge of the two
framesDataflowAnalysisException
protected void mergeValues(ResourceValueFrame otherFrame, ResourceValueFrame resultFrame, int slot) throws DataflowAnalysisException
FrameDataflowAnalysis
mergeValues
in class FrameDataflowAnalysis<ResourceValue,ResourceValueFrame>
otherFrame
- a FrameresultFrame
- a Frame which will contain the resulting merged valueslot
- a slot in both framesDataflowAnalysisException
public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, ResourceValueFrame fact) throws DataflowAnalysisException
AbstractDataflowAnalysis
transferInstruction
in class AbstractDataflowAnalysis<ResourceValueFrame>
handle
- the instructionbasicBlock
- the BasicBlock containing the instruction; needed to
disambiguate instructions in inlined JSR subroutinesfact
- which should be modified based on the instructionDataflowAnalysisException
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.