class EagerReferenceBound extends ReferenceBound
ReferenceType
that can be used
directly. Contrast with LazyReferenceBound
.Constructor and Description |
---|
EagerReferenceBound(ReferenceType boundType)
Creates a bound for the given reference type.
|
Modifier and Type | Method and Description |
---|---|
EagerReferenceBound |
applyCaptureConversion()
Applies a capture conversion to any wildcard arguments in the type of this bound.
|
java.util.List<TypeVariable> |
getTypeParameters()
Returns any type parameters in the type of this bound.
|
(package private) boolean |
isLowerBound(ParameterBound bound,
Substitution substitution)
Tests whether this is a lower bound on the type of a given bound with respect to a type
substitution.
|
boolean |
isLowerBound(Type argType,
Substitution subst)
Indicates whether this bound is a lower bound of the given argument type.
|
boolean |
isSubtypeOf(ParameterBound bound)
Indicates whether the type of this bound is a subtype of the type of the given bound.
|
(package private) boolean |
isUpperBound(ParameterBound bound,
Substitution substitution)
Indicates whether this bound is an upper bound on the type of the given bound with respect to
the type substitution.
|
boolean |
isUpperBound(Type argType,
Substitution subst)
Determines if this bound is an upper bound for the argument type.
|
EagerReferenceBound |
substitute(Substitution substitution)
Applies the given substitution to this type bound by replacing type variables.
|
equals, getBoundType, hasCaptureVariable, hashCode, hasWildcard, isGeneric, isObject, isVariable, toString
forType, forType, forTypes, isGeneric, isTypeVariable
EagerReferenceBound(ReferenceType boundType)
boundType
- the reference boundTypepublic EagerReferenceBound substitute(Substitution substitution)
ParameterBound
substitute
in class ReferenceBound
substitution
- the type substitutionpublic EagerReferenceBound applyCaptureConversion()
ParameterBound
applyCaptureConversion
in class ReferenceBound
ReferenceType.applyCaptureConversion()
public java.util.List<TypeVariable> getTypeParameters()
ParameterBound
getTypeParameters
in class ParameterBound
TypeVariable
objects in this boundpublic boolean isLowerBound(Type argType, Substitution subst)
ParameterBound
isLowerBound
in class ParameterBound
argType
- the concrete argument typesubst
- the substitutionboolean isLowerBound(ParameterBound bound, Substitution substitution)
ParameterBound
return this.substitute(substitution).isLowerBound(bound.substitute(substitution);
isLowerBound
in class ParameterBound
bound
- the other boundsubstitution
- the type substitutionpublic boolean isSubtypeOf(ParameterBound bound)
ParameterBound
isSubtypeOf
in class ParameterBound
bound
- the other boundpublic boolean isUpperBound(Type argType, Substitution subst)
ParameterBound
isUpperBound
in class ParameterBound
argType
- the concrete argument typesubst
- the substitutionboolean isUpperBound(ParameterBound bound, Substitution substitution)
ParameterBound
isUpperBound
in class ParameterBound
bound
- the other boundsubstitution
- the type substitution