Package randoop.types

Class EagerReferenceBound

    • Constructor Detail

      • EagerReferenceBound

        EagerReferenceBound​(ReferenceType boundType)
        Creates a bound for the given reference type.
        Parameters:
        boundType - the reference boundType
    • Method Detail

      • substitute

        public EagerReferenceBound substitute​(Substitution substitution)
        Description copied from class: ParameterBound
        Applies the given substitution to this type bound by replacing type variables.
        Specified by:
        substitute in class ReferenceBound
        Parameters:
        substitution - the type substitution
        Returns:
        this bound with the type after the substitution has been applied
      • isLowerBound

        public boolean isLowerBound​(Type argType,
                                    Substitution subst)
        Description copied from class: ParameterBound
        Indicates whether this bound is a lower bound of the given argument type.
        Specified by:
        isLowerBound in class ParameterBound
        Parameters:
        argType - the concrete argument type
        subst - the substitution
        Returns:
        true if this bound is a subtype of the given type
      • isLowerBound

        boolean isLowerBound​(ParameterBound bound,
                             Substitution substitution)
        Description copied from class: ParameterBound
        Tests whether this is a lower bound on the type of a given bound with respect to a type substitution. The body is approximately:
        return this.substitute(substitution).isLowerBound(bound.substitute(substitution);
         
        Overrides:
        isLowerBound in class ParameterBound
        Parameters:
        bound - the other bound
        substitution - the type substitution
        Returns:
        true iff this bound is a lower bound on the type of the given bound
      • isSubtypeOf

        public boolean isSubtypeOf​(ParameterBound bound)
        Description copied from class: ParameterBound
        Indicates whether the type of this bound is a subtype of the type of the given bound.
        Specified by:
        isSubtypeOf in class ParameterBound
        Parameters:
        bound - the other bound
        Returns:
        true if this type is a subtype of the other bound, false otherwise
      • isUpperBound

        public boolean isUpperBound​(Type argType,
                                    Substitution subst)
        Description copied from class: ParameterBound
        Determines if this bound is an upper bound for the argument type.
        Specified by:
        isUpperBound in class ParameterBound
        Parameters:
        argType - the concrete argument type
        subst - the substitution
        Returns:
        true if this bound is satisfied by the concrete type when the substitution is used on the bound, false otherwise
      • isUpperBound

        boolean isUpperBound​(ParameterBound bound,
                             Substitution substitution)
        Description copied from class: ParameterBound
        Indicates whether this bound is an upper bound on the type of the given bound with respect to the type substitution.
        Specified by:
        isUpperBound in class ParameterBound
        Parameters:
        bound - the other bound
        substitution - the type substitution
        Returns:
        true if this bound is an upper bound on the type of the given bound, false otherwise