Package edu.umd.cs.findbugs.ba.npe
Class IsNullConditionDecision
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.npe.IsNullConditionDecision
-
public class IsNullConditionDecision extends java.lang.ObjectA control decision which resulted in information being gained about whether a particular value is null or non-null on the IFCMP_EDGE and FALL_THROUGH_EDGE branches.- See Also:
IsNullValue,IsNullValueFrame,IsNullValueAnalysis
-
-
Constructor Summary
Constructors Constructor Description IsNullConditionDecision(ValueNumber value, IsNullValue ifcmpDecision, IsNullValue fallThroughDecision)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)IsNullValuegetDecision(int edgeType)Get the decision reached about the value on outgoing edge of given type.ValueNumbergetValue()Get the value about which the branch yields information.inthashCode()booleanisEdgeFeasible(int edgeType)Determine whether or not the given edge is feasible.booleanisRedundant()Determine whether or not the comparison is redundant.java.lang.StringtoString()
-
-
-
Constructor Detail
-
IsNullConditionDecision
public IsNullConditionDecision(@CheckForNull ValueNumber value, @CheckForNull IsNullValue ifcmpDecision, @CheckForNull IsNullValue fallThroughDecision)Constructor.- Parameters:
value- the ValueNumber for which we have new information; null if no new informationifcmpDecision- the decision for the IFCMP_EDGE; null if that edge is not feasiblefallThroughDecision- the decision for the FALL_THROUGH_EDGE; null if that edge is not feasible
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
getValue
public ValueNumber getValue()
Get the value about which the branch yields information.
-
isRedundant
public boolean isRedundant()
Determine whether or not the comparison is redundant.
-
isEdgeFeasible
public boolean isEdgeFeasible(int edgeType)
Determine whether or not the given edge is feasible. An edge may be infeasible if the comparison is redundant (i.e., can only be determined one way)- Parameters:
edgeType- the type of edge; must be IFCMP_EDGE or FALL_THROUGH_EDGE- Returns:
- true if the edge is feasible, false if infeasible
-
getDecision
@CheckForNull public IsNullValue getDecision(int edgeType)
Get the decision reached about the value on outgoing edge of given type.- Parameters:
edgeType- the type of edge; must be IFCMP_EDGE or FALL_THROUGH_EDGE- Returns:
- the IsNullValue representing the decision, or null if the edge is infeasible
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-