Class BoundsInitializer

java.lang.Object
org.checkerframework.framework.type.BoundsInitializer

public class BoundsInitializer extends 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 Details

    • BoundsInitializer

      public BoundsInitializer()
  • Method Details

    • initializeTypeArgs

      public static void initializeTypeArgs(AnnotatedTypeMirror.AnnotatedDeclaredType declaredType)
      Initializes the type arguments of declaredType. The upper bound of unbound wildcards is set to the upper bound of the type parameter for which it is an argument. If declaredType 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