FindBugs™ 1.3.9

edu.umd.cs.findbugs.ba.jsr305
Class BackwardTypeQualifierDataflowAnalysis

java.lang.Object
  extended by edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis<Fact>
      extended by edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis<TypeQualifierValueSet>
          extended by edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowAnalysis
              extended by edu.umd.cs.findbugs.ba.jsr305.BackwardTypeQualifierDataflowAnalysis
All Implemented Interfaces:
DataflowAnalysis<TypeQualifierValueSet>

public class BackwardTypeQualifierDataflowAnalysis
extends TypeQualifierDataflowAnalysis

Backwards type qualifier dataflow analysis.

Author:
David Hovemeyer

Field Summary
 
Fields inherited from class edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowAnalysis
cfg, cpg, typeQualifierValue, vnaDataflow, xmethod
 
Constructor Summary
BackwardTypeQualifierDataflowAnalysis(DepthFirstSearch dfs, ReverseDepthFirstSearch rdfs, XMethod xmethod, CFG cfg, ValueNumberDataflow vnaDataflow, org.apache.bcel.generic.ConstantPoolGen cpg, TypeQualifierValue typeQualifierValue)
          Constructor.
 
Method Summary
 void edgeTransfer(Edge edge, TypeQualifierValueSet fact)
          Edge transfer function.
 BlockOrder getBlockOrder(CFG cfg)
          Return the BlockOrder specifying the order in which BasicBlocks should be visited in the main dataflow loop.
 boolean isForwards()
          Returns true if the analysis is forwards, false if backwards.
protected  void propagateAcrossPhiNode(TypeQualifierValueSet fact, ValueNumber sourceVN, ValueNumber targetVN)
           
 void registerSourceSinkLocations()
          This method must be called before the dataflow analysis is executed.
 void setForwardTypeQualifierDataflow(ForwardTypeQualifierDataflow forwardTypeQualifierDataflow)
           
 void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, TypeQualifierValueSet fact)
          Transfer function for a single instruction.
 
Methods inherited from class edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowAnalysis
copy, createFact, getSourceSinkInfoSet, initEntryFact, isFactValid, isTop, makeFactTop, meetInto, registerSourceSink, same
 
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis
getFactAfterLocation, getFactAtLocation, transfer
 
Methods inherited from class edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis
factToString, finishIteration, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIteration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackwardTypeQualifierDataflowAnalysis

public BackwardTypeQualifierDataflowAnalysis(DepthFirstSearch dfs,
                                             ReverseDepthFirstSearch rdfs,
                                             XMethod xmethod,
                                             CFG cfg,
                                             ValueNumberDataflow vnaDataflow,
                                             org.apache.bcel.generic.ConstantPoolGen cpg,
                                             TypeQualifierValue typeQualifierValue)
Constructor.

Parameters:
dfs - DepthFirstSearch on the analyzed method
rdfs - ReverseDepthFirstSearch on the analyzed method
xmethod - XMethod for the analyzed method
cfg - CFG of the analyzed method
vnaDataflow - ValueNumberDataflow on the analyzed method
cpg - ConstantPoolGen of the analyzed method
typeQualifierValue - TypeQualifierValue representing type qualifier the analysis should check
Method Detail

setForwardTypeQualifierDataflow

public void setForwardTypeQualifierDataflow(ForwardTypeQualifierDataflow forwardTypeQualifierDataflow)
Parameters:
forwardTypeQualifierDataflow - The forwardTypeQualifierDataflow to set.

edgeTransfer

public void edgeTransfer(Edge edge,
                         TypeQualifierValueSet fact)
                  throws DataflowAnalysisException
Description copied from interface: DataflowAnalysis
Edge transfer function. Modify the given fact that is true on the (logical) edge source to modify it so that it is true at the (logical) edge target.

A do-nothing implementation is legal, and appropriate for analyses where branches are not significant.

Specified by:
edgeTransfer in interface DataflowAnalysis<TypeQualifierValueSet>
Overrides:
edgeTransfer in class TypeQualifierDataflowAnalysis
Parameters:
edge - the Edge
fact - a dataflow fact
Throws:
DataflowAnalysisException

transferInstruction

public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle,
                                BasicBlock basicBlock,
                                TypeQualifierValueSet fact)
                         throws DataflowAnalysisException
Description copied from class: AbstractDataflowAnalysis
Transfer function for a single instruction.

Overrides:
transferInstruction in class TypeQualifierDataflowAnalysis
Parameters:
handle - the instruction
basicBlock - the BasicBlock containing the instruction; needed to disambiguate instructions in inlined JSR subroutines
fact - which should be modified based on the instruction
Throws:
DataflowAnalysisException

getBlockOrder

public BlockOrder getBlockOrder(CFG cfg)
Description copied from interface: DataflowAnalysis
Return the BlockOrder specifying the order in which BasicBlocks should be visited in the main dataflow loop.

Parameters:
cfg - the CFG upon which we're performing dataflow analysis

isForwards

public boolean isForwards()
Description copied from interface: DataflowAnalysis
Returns true if the analysis is forwards, false if backwards.


registerSourceSinkLocations

public void registerSourceSinkLocations()
                                 throws DataflowAnalysisException
Description copied from class: TypeQualifierDataflowAnalysis
This method must be called before the dataflow analysis is executed.

Specified by:
registerSourceSinkLocations in class TypeQualifierDataflowAnalysis
Throws:
DataflowAnalysisException

propagateAcrossPhiNode

protected void propagateAcrossPhiNode(TypeQualifierValueSet fact,
                                      ValueNumber sourceVN,
                                      ValueNumber targetVN)
Specified by:
propagateAcrossPhiNode in class TypeQualifierDataflowAnalysis

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.