public static final class ContractReturnValue.BooleanReturnValue extends ContractReturnValue
ContractReturnValue.BooleanReturnValue, ContractReturnValue.ParameterReturnValue
Modifier and Type | Method and Description |
---|---|
DfaValue |
getDfaValue(DfaValueFactory factory,
DfaValue defaultValue,
com.intellij.codeInspection.dataFlow.DfaCallState callState)
Converts this return value to the most suitable
DfaValue which represents the same constraints. |
boolean |
getValue() |
boolean |
isValueCompatible(DfaMemoryState state,
DfaValue value)
Returns true if the supplied
DfaValue could be compatible with this return value. |
ContractReturnValue.BooleanReturnValue |
negate() |
fail, getMethodCompatibilityProblem, hashCode, intersect, isBoolean, isFail, isMethodCompatible, isNotNull, isNull, isSuperValueOf, ordinal, returnAny, returnBoolean, returnFalse, returnNew, returnNotNull, returnNull, returnParameter, returnThis, returnTrue, toString, valueOf, valueOf
public boolean getValue()
public ContractReturnValue.BooleanReturnValue negate()
public DfaValue getDfaValue(DfaValueFactory factory, DfaValue defaultValue, com.intellij.codeInspection.dataFlow.DfaCallState callState)
ContractReturnValue
DfaValue
which represents the same constraints.getDfaValue
in class ContractReturnValue
factory
- a DfaValueFactory
which can be used to create new values if necessarydefaultValue
- a default method return type value in the absence of the contracts (may contain method type information)callState
- call statepublic boolean isValueCompatible(DfaMemoryState state, DfaValue value)
ContractReturnValue
DfaValue
could be compatible with this return value. If false is returned, then
returning given DfaValue
would violate the contract with this return value. This method can be used
to check the contract correctness.isValueCompatible
in class ContractReturnValue
state
- memory state to usevalue
- value to check