public class DfTypes
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static DfBooleanType |
BOOLEAN
A type that corresponds to JVM boolean type.
|
static DfType |
BOTTOM
A type that contains no values
|
static DfDoubleType |
DOUBLE
A type that corresponds to JVM double type
|
static DfType |
FAIL
A special value that represents a contract failure after method return (the control flow should immediately proceed
with exception handling).
|
static com.intellij.codeInspection.dataFlow.types.DfBooleanConstantType |
FALSE
A false boolean constant
|
static DfFloatType |
FLOAT
A type that corresponds to JVM float type
|
static DfIntType |
INT
A type that corresponds to JVM int type
|
static DfReferenceType |
LOCAL_OBJECT
A reference type that contains any reference to a local object
|
static DfLongType |
LONG
A type that corresponds to JVM long type
|
static DfReferenceType |
NOT_NULL_OBJECT
A reference type that contains any reference except null
|
static DfNullConstantType |
NULL
A reference type that contains only null reference
|
static DfReferenceType |
OBJECT_OR_NULL
A reference type that contains any reference or null
|
static DfType |
TOP
A type that contains every possible value supported by the type system
|
static com.intellij.codeInspection.dataFlow.types.DfBooleanConstantType |
TRUE
A true boolean constant
|
Modifier and Type | Method and Description |
---|---|
static com.intellij.codeInspection.dataFlow.types.DfBooleanConstantType |
booleanValue(boolean value) |
static DfConstantType<?> |
constant(java.lang.Object constant,
PsiType type)
Returns a custom constant type
|
static DfReferenceType |
customObject(TypeConstraint constraint,
DfaNullability nullability,
Mutability mutability,
SpecialField specialField,
DfType sfType)
A low-level method to construct a custom reference type.
|
static DfConstantType<?> |
defaultValue(PsiType type) |
static com.intellij.codeInspection.dataFlow.types.DfDoubleConstantType |
doubleValue(double value) |
static com.intellij.codeInspection.dataFlow.types.DfFloatConstantType |
floatValue(float value) |
static DfType |
intRange(LongRangeSet range)
Creates a type that represents a subset of int values.
|
static DfType |
intRangeClamped(LongRangeSet range)
Creates a type that represents a subset of int values, clamping values not representable in the JVM int type.
|
static com.intellij.codeInspection.dataFlow.types.DfIntConstantType |
intValue(int value) |
static DfType |
longRange(LongRangeSet range)
Creates a type that represents a subset of long values.
|
static com.intellij.codeInspection.dataFlow.types.DfLongConstantType |
longValue(long value) |
static DfType |
rangeClamped(LongRangeSet range,
boolean isLong)
A convenience selector method to call
longRange(LongRangeSet) or intRangeClamped(LongRangeSet) |
static DfType |
typedObject(PsiType type,
Nullability nullability) |
public static final DfType TOP
public static final DfType BOTTOM
public static final DfType FAIL
public static final DfBooleanType BOOLEAN
public static final com.intellij.codeInspection.dataFlow.types.DfBooleanConstantType TRUE
public static final com.intellij.codeInspection.dataFlow.types.DfBooleanConstantType FALSE
public static final DfIntType INT
public static final DfLongType LONG
public static final DfFloatType FLOAT
public static final DfDoubleType DOUBLE
public static final DfNullConstantType NULL
public static final DfReferenceType NOT_NULL_OBJECT
public static final DfReferenceType OBJECT_OR_NULL
public static final DfReferenceType LOCAL_OBJECT
public static com.intellij.codeInspection.dataFlow.types.DfBooleanConstantType booleanValue(boolean value)
value
- boolean valuepublic static DfType intRangeClamped(LongRangeSet range)
range
- range of values. Values that cannot be represented in JVM int type are removed from this range upon creation.BOTTOM
if range is empty or all its values are out of the int domain.public static DfType intRange(LongRangeSet range)
range
- range of values.BOTTOM
if range is empty.java.lang.IllegalArgumentException
- if range contains values not representable in the JVM int type.public static com.intellij.codeInspection.dataFlow.types.DfIntConstantType intValue(int value)
value
- int valuepublic static DfType longRange(LongRangeSet range)
range
- range of values.BOTTOM
if range is empty.public static com.intellij.codeInspection.dataFlow.types.DfLongConstantType longValue(long value)
value
- long valuepublic static DfType rangeClamped(LongRangeSet range, boolean isLong)
longRange(LongRangeSet)
or intRangeClamped(LongRangeSet)
range
- rangeisLong
- whether int or long type should be createdpublic static com.intellij.codeInspection.dataFlow.types.DfFloatConstantType floatValue(float value)
value
- float valuepublic static com.intellij.codeInspection.dataFlow.types.DfDoubleConstantType doubleValue(double value)
value
- double valuepublic static DfConstantType<?> constant(java.lang.Object constant, PsiType type)
constant
- constant valuetype
- value typepublic static DfConstantType<?> defaultValue(PsiType type)
type
- PsiType to get default value ofpublic static DfType typedObject(PsiType type, Nullability nullability)
type
- type of the objectnullability
- nullabilitypublic static DfReferenceType customObject(TypeConstraint constraint, DfaNullability nullability, Mutability mutability, SpecialField specialField, DfType sfType)
DfType.meet(DfType)
calls like
constraint.asDfType()
.meet(mutability.asDfType())
.meet(LOCAL_OBJECT)
.meet(specialField.asDfType(sfType))
constraint
- type constraintnullability
- nullability, must not be DfaNullability.NULL
mutability
- mutability desired mutabilityspecialField
- special fieldsfType
- type of special field