Package edu.umd.cs.findbugs.ba.npe
Class RedundantBranch
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.npe.RedundantBranch
-
public class RedundantBranch extends java.lang.Object
An instruction recorded as a redundant reference comparison. We keep track of the line number, in order to ensure that if the branch was duplicated, all duplicates are determined in the same way. (If they aren't, then we don't report it.)
-
-
Field Summary
Fields Modifier and Type Field Description IsNullValue
firstValue
Edge
infeasibleEdge
int
lineNumber
Location
location
IsNullValue
secondValue
-
Constructor Summary
Constructors Constructor Description RedundantBranch(Location location, int lineNumber, IsNullValue firstValue)
Constructor.RedundantBranch(Location location, int lineNumber, IsNullValue firstValue, IsNullValue secondValue)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setInfeasibleEdge(Edge infeasibleEdge)
Set the edge which has been determined to be infeasible.java.lang.String
toString()
-
-
-
Field Detail
-
location
public final Location location
-
lineNumber
public final int lineNumber
-
firstValue
public final IsNullValue firstValue
-
secondValue
public final IsNullValue secondValue
-
infeasibleEdge
public Edge infeasibleEdge
-
-
Constructor Detail
-
RedundantBranch
public RedundantBranch(Location location, int lineNumber, IsNullValue firstValue, IsNullValue secondValue)
Constructor.- Parameters:
location
- Location of ref comparisonlineNumber
- line number of ref comparisonfirstValue
- first value comparedsecondValue
- second value compared
-
RedundantBranch
public RedundantBranch(Location location, int lineNumber, IsNullValue firstValue)
Constructor.- Parameters:
location
- Location of ref comparisonlineNumber
- line number of ref comparisonfirstValue
- first value compared
-
-
Method Detail
-
setInfeasibleEdge
public void setInfeasibleEdge(Edge infeasibleEdge)
Set the edge which has been determined to be infeasible.- Parameters:
infeasibleEdge
- The infeasibleEdge to set.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-