java.lang.Object
org.checkerframework.framework.util.typeinference8.types.AbstractType
org.checkerframework.framework.util.typeinference8.types.ProperType

public class ProperType extends AbstractType
A type that does not contain any inference variables.
  • Constructor Details

  • Method Details

    • getKind

      public AbstractType.Kind getKind()
      Description copied from class: AbstractType
      Returns the kind of AbstractType.
      Specified by:
      getKind in class AbstractType
      Returns:
      the kind of AbstractType
    • create

      public AbstractType create(AnnotatedTypeMirror atm, TypeMirror type)
      Description copied from class: AbstractType
      Creates a type using the given types.
      Specified by:
      create in class AbstractType
      Parameters:
      atm - annotated type mirror
      type - type mirror
      Returns:
      the new type
    • boxType

      public ProperType boxType()
      If this is a primitive type, then the proper type corresponding to its wrapper is returned. Otherwise, this object is return.
      Returns:
      the proper type that is the wrapper type for this type or this if no such wrapper exists
    • isSubType

      public ReductionResult isSubType(ProperType superType)
      Is this a subtype of superType?
      Parameters:
      superType - super type
      Returns:
      if this is a subtype of superType, then return ConstraintSet.TRUE; otherwise, a false bound is returned
    • isSubTypeUnchecked

      public ReductionResult isSubTypeUnchecked(ProperType superType)
      Is this an unchecked subtype of superType?
      Parameters:
      superType - super type
      Returns:
      if this is an unchecked subtype of superType, then return ConstraintSet.TRUE; otherwise, a false bound is returned
    • isAssignable

      public ReductionResult isAssignable(ProperType superType)
      Is this assignable to superType?
      Parameters:
      superType - super type
      Returns:
      if this assignable to superType, then return ConstraintSet.TRUE; otherwise, a false bound is returned
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractType
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractType
    • getJavaType

      public TypeMirror getJavaType()
      Description copied from class: AbstractType
      Return the underlying Java type without inference variables.
      Specified by:
      getJavaType in class AbstractType
      Returns:
      the underlying Java type without inference variables
    • getAnnotatedType

      public AnnotatedTypeMirror getAnnotatedType()
      Description copied from class: AbstractType
      Return the underlying Java type without inference variables.
      Specified by:
      getAnnotatedType in class AbstractType
      Returns:
      the underlying Java type without inference variables
    • isObject

      public boolean isObject()
      Description copied from class: AbstractType
      Return true if this type is java.lang.Object.
      Specified by:
      isObject in class AbstractType
      Returns:
      true if this type is java.lang.Object
    • getInferenceVariables

      public Collection<Variable> getInferenceVariables()
      Description copied from class: AbstractType
      Return a collection of all inference variables referenced by this type.
      Specified by:
      getInferenceVariables in class AbstractType
      Returns:
      a collection of all inference variables referenced by this type
    • applyInstantiations

      public AbstractType applyInstantiations()
      Description copied from class: AbstractType
      Return a new type that is the same as this one except the variables in instantiations have been replaced by their instantiation.
      Specified by:
      applyInstantiations in class AbstractType
      Returns:
      a new type that is the same as this one except the variables in instantiations have been replaced by their instantiation
    • getQualifiers

      public Set<AbstractQualifier> getQualifiers()
      Description copied from class: AbstractType
      Returns the primary qualifiers on this type.
      Specified by:
      getQualifiers in class AbstractType
      Returns:
      the primary qualifiers on this type
    • toString

      public String toString()
      Overrides:
      toString in class Object