FindBugs™ 1.3.9

edu.umd.cs.findbugs.ba.heap
Class FieldSetAnalysis

java.lang.Object
  extended by edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis<Fact>
      extended by edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis<Fact>
          extended by edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis<FieldSet>
              extended by edu.umd.cs.findbugs.ba.heap.FieldSetAnalysis
All Implemented Interfaces:
DataflowAnalysis<FieldSet>
Direct Known Subclasses:
LoadAnalysis, StoreAnalysis

public abstract class FieldSetAnalysis
extends ForwardDataflowAnalysis<FieldSet>

Author:
David Hovemeyer

Constructor Summary
FieldSetAnalysis(DepthFirstSearch dfs, org.apache.bcel.generic.ConstantPoolGen cpg)
           
 
Method Summary
 void copy(FieldSet source, FieldSet dest)
          Copy dataflow facts.
 FieldSet createFact()
          Create empty (uninitialized) dataflow facts for one program point.
 org.apache.bcel.generic.ConstantPoolGen getCPG()
           
 void initEntryFact(FieldSet result)
          Initialize the "entry" fact for the graph.
 boolean isFactValid(FieldSet fact)
          Determine whether the given fact is valid (neither top nor bottom).
 boolean isTop(FieldSet fact)
          Is the given fact the top value.
 void makeFactTop(FieldSet fact)
          Make given fact the top value.
 void meetInto(FieldSet fact, Edge edge, FieldSet result)
          Meet a dataflow fact associated with an incoming edge into another fact.
 boolean same(FieldSet fact1, FieldSet fact2)
          Are given dataflow facts the same?
protected abstract  void sawLoad(FieldSet fact, XField field)
           
protected abstract  void sawStore(FieldSet fact, XField field)
           
 void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, FieldSet 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldSetAnalysis

public FieldSetAnalysis(DepthFirstSearch dfs,
                        org.apache.bcel.generic.ConstantPoolGen cpg)
Method Detail

getCPG

public org.apache.bcel.generic.ConstantPoolGen getCPG()

makeFactTop

public void makeFactTop(FieldSet fact)
Description copied from interface: DataflowAnalysis
Make given fact the top value.


isTop

public boolean isTop(FieldSet fact)
Description copied from interface: DataflowAnalysis
Is the given fact the top value.


initEntryFact

public void initEntryFact(FieldSet result)
                   throws DataflowAnalysisException
Description copied from interface: DataflowAnalysis
Initialize the "entry" fact for the graph.

Throws:
DataflowAnalysisException

meetInto

public void meetInto(FieldSet fact,
                     Edge edge,
                     FieldSet 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.

Parameters:
fact - the predecessor fact (incoming edge)
edge - the edge from the predecessor
result - the result fact
Throws:
DataflowAnalysisException

same

public boolean same(FieldSet fact1,
                    FieldSet fact2)
Description copied from interface: DataflowAnalysis
Are given dataflow facts the same?


createFact

public FieldSet 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.


isFactValid

public boolean isFactValid(FieldSet fact)
Description copied from class: AbstractDataflowAnalysis
Determine whether the given fact is valid (neither top nor bottom).

Specified by:
isFactValid in class AbstractDataflowAnalysis<FieldSet>

copy

public void copy(FieldSet source,
                 FieldSet dest)
Description copied from interface: DataflowAnalysis
Copy dataflow facts.


transferInstruction

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

Specified by:
transferInstruction in class AbstractDataflowAnalysis<FieldSet>
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

sawLoad

protected abstract void sawLoad(FieldSet fact,
                                XField field)

sawStore

protected abstract void sawStore(FieldSet fact,
                                 XField field)

FindBugs™ 1.3.9

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