Class BoundsInitializer
- java.lang.Object
-
- org.checkerframework.framework.type.BoundsInitializer
-
public class BoundsInitializer extends java.lang.Object
BoundsInitializer creates AnnotatedTypeMirrors (without annotations) for the bounds of type variables and wildcards. Its static helper methods are called from AnnotatedTypeMirror. When an initializer method is called for a particular bound, the entirety of that bound, including circular references, will be created.
-
-
Constructor Summary
Constructors Constructor Description BoundsInitializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
initializeBounds(AnnotatedTypeMirror.AnnotatedTypeVariable typeVar)
Create the entire lower bound and upper bound, with no missing information, for typeVar.static void
initializeExtendsBound(AnnotatedTypeMirror.AnnotatedWildcardType wildcard)
Create the entire extends bound, with no missing information, for wildcard.static void
initializeSuperBound(AnnotatedTypeMirror.AnnotatedWildcardType wildcard)
Create the entire super bound, with no missing information, for wildcard.static void
initializeTypeArgs(AnnotatedTypeMirror.AnnotatedDeclaredType declaredType)
Initializes the type arguments ofdeclaredType
.
-
-
-
Method Detail
-
initializeTypeArgs
public static void initializeTypeArgs(AnnotatedTypeMirror.AnnotatedDeclaredType declaredType)
Initializes the type arguments ofdeclaredType
. The upper bound of unbound wildcards is set to the upper bound of the type parameter for which it is an argument. IfdeclaredType
is raw, then the type arguments are uninferred wildcards.- Parameters:
declaredType
- type whose arguments are initialized
-
initializeBounds
public static void initializeBounds(AnnotatedTypeMirror.AnnotatedTypeVariable typeVar)
Create the entire lower bound and upper bound, with no missing information, for typeVar. If a typeVar is recursive the appropriate cycles will be introduced in the type- Parameters:
typeVar
- the type variable whose lower bound is being initialized
-
initializeSuperBound
public static void initializeSuperBound(AnnotatedTypeMirror.AnnotatedWildcardType wildcard)
Create the entire super bound, with no missing information, for wildcard. If a wildcard is recursive the appropriate cycles will be introduced in the type- Parameters:
wildcard
- the wildcard whose lower bound is being initialized
-
initializeExtendsBound
public static void initializeExtendsBound(AnnotatedTypeMirror.AnnotatedWildcardType wildcard)
Create the entire extends bound, with no missing information, for wildcard. If a wildcard is recursive the appropriate cycles will be introduced in the type- Parameters:
wildcard
- the wildcard whose extends bound is being initialized
-
-