Class NullnessValue
java.lang.Object
org.checkerframework.framework.flow.CFAbstractValue<NullnessValue>
org.checkerframework.checker.nullness.NullnessValue
- All Implemented Interfaces:
AbstractValue<NullnessValue>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.framework.flow.CFAbstractValue
CFAbstractValue.AnnotationSetCombiner, CFAbstractValue.ValueGlb, CFAbstractValue.ValueLub
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
Fields inherited from class org.checkerframework.framework.flow.CFAbstractValue
analysis, annotations, atypeFactory, qualHierarchy, underlyingType
-
Constructor Summary
ConstructorDescriptionNullnessValue
(CFAbstractAnalysis<NullnessValue, ?, ?> analysis, AnnotationMirrorSet annotations, TypeMirror underlyingType) Creates a new NullnessValue. -
Method Summary
Modifier and TypeMethodDescriptionReturns the string representation, using simple (not fully-qualified) names.protected NullnessValue
upperBound
(@Nullable NullnessValue other, TypeMirror upperBoundTypeMirror, boolean shouldWiden) Returns an upper bound ofthis
andother
.Methods inherited from class org.checkerframework.framework.flow.CFAbstractValue
canBeMissingAnnotations, equals, getAnnotations, getUnderlyingType, greatestLowerBound, hashCode, leastUpperBound, leastUpperBound, mostSpecific, toString, toStringFullyQualified, validateSet, widenUpperBound
-
Field Details
-
isPolyNullNonNull
protected boolean isPolyNullNonNull -
isPolyNullNull
protected boolean isPolyNullNull
-
-
Constructor Details
-
NullnessValue
public NullnessValue(CFAbstractAnalysis<NullnessValue, ?, ?> analysis, AnnotationMirrorSet annotations, TypeMirror underlyingType) Creates a new NullnessValue.- Parameters:
analysis
- the analysisannotations
- the annotationsunderlyingType
- the underlying type
-
-
Method Details
-
upperBound
protected NullnessValue upperBound(@Nullable NullnessValue other, TypeMirror upperBoundTypeMirror, boolean shouldWiden) Description copied from class:CFAbstractValue
Returns an upper bound ofthis
andother
. The underlying type of the value returned isupperBoundTypeMirror
. IfshouldWiden
is false, this method returns the least upper bound ofthis
andother
.This is the implementation of
CFAbstractValue.leastUpperBound(CFAbstractValue, TypeMirror)
,CFAbstractValue.leastUpperBound(CFAbstractValue)
,CFAbstractValue.widenUpperBound(CFAbstractValue)
, andCFAbstractValue.upperBound(CFAbstractValue, boolean)
. Subclasses may override it.- Overrides:
upperBound
in classCFAbstractValue<NullnessValue>
- Parameters:
other
- an abstract valueupperBoundTypeMirror
- the underlying type of the returned valueshouldWiden
- true if the method should perform widening- Returns:
- an upper bound of this and
other
-
toStringSimple
Description copied from class:CFAbstractValue
Returns the string representation, using simple (not fully-qualified) names.- Overrides:
toStringSimple
in classCFAbstractValue<NullnessValue>
- Returns:
- the string representation, using simple (not fully-qualified) names
-