Package edu.umd.cs.findbugs.ba.npe
Class ReturnPathType
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.npe.ReturnPathType
-
public class ReturnPathType extends java.lang.ObjectA dataflow value that indicates what kind of return path is possible at the current program location. Either:- It is possible to return normally
- It is not possible to return normally (i.e., an exception is guaranteed to be thrown)
- Author:
- David Hovemeyer
-
-
Constructor Summary
Constructors Constructor Description ReturnPathType()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanReturnNormally()voidcopyFrom(ReturnPathType other)Make this dataflow fact an exact copy of the other one.booleanisTop()booleanisValid()voidmergeWith(ReturnPathType fact)Merge this fact with given fact.voidsetCanReturnNormally(boolean canReturnNormally)Set whether or not it is possible to return normally.voidsetTop()Set the dataflow fact to top.java.lang.StringtoString()
-
-
-
Method Detail
-
canReturnNormally
public boolean canReturnNormally() throws DataflowAnalysisException- Returns:
- true if the method can return normally at this location, false otherwise
- Throws:
DataflowAnalysisException
-
copyFrom
public void copyFrom(ReturnPathType other)
Make this dataflow fact an exact copy of the other one.- Parameters:
other- another dataflow fact
-
setTop
public void setTop()
Set the dataflow fact to top.
-
isTop
public boolean isTop()
- Returns:
- true if the dataflow fact is top, false otherwise
-
setCanReturnNormally
public void setCanReturnNormally(boolean canReturnNormally)
Set whether or not it is possible to return normally.- Parameters:
canReturnNormally- true if the method can return normally at this location, false otherwise
-
mergeWith
public void mergeWith(ReturnPathType fact)
Merge this fact with given fact.- Parameters:
fact- another dataflow fact
-
isValid
public boolean isValid()
- Returns:
- true if this is a valid dataflow fact (not top or bottom), false if not a valid dataflow fact
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-