public static final class ContractReturnValue.ParameterReturnValue extends ContractReturnValue
ContractReturnValue.BooleanReturnValue, ContractReturnValue.ParameterReturnValue
Constructor and Description |
---|
ParameterReturnValue(int n) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
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. |
int |
getParameterNumber() |
boolean |
isValueCompatible(DfaMemoryState state,
DfaValue value)
Returns true if the supplied
DfaValue could be compatible with this return value. |
fail, getMethodCompatibilityProblem, hashCode, intersect, isBoolean, isFail, isMethodCompatible, isNotNull, isNull, isSuperValueOf, ordinal, returnAny, returnBoolean, returnFalse, returnNew, returnNotNull, returnNull, returnParameter, returnThis, returnTrue, toString, valueOf, valueOf
public int getParameterNumber()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
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