Package edu.umd.cs.findbugs.ba.npe
Class ReturnPathType
java.lang.Object
edu.umd.cs.findbugs.ba.npe.ReturnPathType
A 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)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
copyFrom
(ReturnPathType other) Make this dataflow fact an exact copy of the other one.boolean
isTop()
boolean
isValid()
void
mergeWith
(ReturnPathType fact) Merge this fact with given fact.(package private) boolean
sameAs
(ReturnPathType other) Determine whether this dataflow fact is identical to another one.void
setCanReturnNormally
(boolean canReturnNormally) Set whether or not it is possible to return normally.void
setTop()
Set the dataflow fact to top.toString()
-
Field Details
-
CAN_RETURN_NORMALLY
private static final int CAN_RETURN_NORMALLY- See Also:
-
CANNOT_RETURN_NORMALLY
private static final int CANNOT_RETURN_NORMALLY- See Also:
-
TOP
private static final int TOP- See Also:
-
type
private int type
-
-
Constructor Details
-
ReturnPathType
public ReturnPathType()Constructor. Creates a top dataflow fact.
-
-
Method Details
-
canReturnNormally
- Returns:
- true if the method can return normally at this location, false otherwise
- Throws:
DataflowAnalysisException
-
copyFrom
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
Merge this fact with given fact.- Parameters:
fact
- another dataflow fact
-
sameAs
Determine whether this dataflow fact is identical to another one.- Parameters:
other
- another dataflow fact- Returns:
- true if the two dataflow facts are identical, false if they are different
-
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
-