edu.umd.cs.findbugs.ba.npe

Class IsNullConditionDecision

public class IsNullConditionDecision extends Object implements EdgeTypes

A 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
IsNullConditionDecision(ValueNumber value, IsNullValue ifcmpDecision, IsNullValue fallThroughDecision)
Constructor.
Method Summary
ValueNumbergetValue()
Get the value about which the branch yields information.
booleanisEdgeFeasible(int edgeType)
Determine whether or not the given edge is feasible.
booleanisRedundant()
Determine whether or not the comparison is redundant.

Constructor Detail

IsNullConditionDecision

public IsNullConditionDecision(ValueNumber value, IsNullValue ifcmpDecision, IsNullValue fallThroughDecision)
Constructor.

Parameters: value the ValueNumber for which we have new information; null if no new information ifcmpDecision the decision for the IFCMP_EDGE; null if that edge is not feasible fallThroughDecision the decision for the FALL_THROUGH_EDGE; null if that edge is not feasible

Method Detail

getValue

public ValueNumber getValue()
Get the value about which the branch yields information.

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

isRedundant

public boolean isRedundant()
Determine whether or not the comparison is redundant.
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.