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, toStringforType, forType, forTypes, isGeneric, isTypeVariableEagerReferenceBound(ReferenceType boundType)
boundType - the reference boundTypepublic EagerReferenceBound substitute(Substitution substitution)
ParameterBoundsubstitute in class ReferenceBoundsubstitution - the type substitutionpublic EagerReferenceBound applyCaptureConversion()
ParameterBoundapplyCaptureConversion in class ReferenceBoundReferenceType.applyCaptureConversion()public java.util.List<TypeVariable> getTypeParameters()
ParameterBoundgetTypeParameters in class ParameterBoundTypeVariable objects in this boundpublic boolean isLowerBound(Type argType, Substitution subst)
ParameterBoundisLowerBound in class ParameterBoundargType - the concrete argument typesubst - the substitutionboolean isLowerBound(ParameterBound bound, Substitution substitution)
ParameterBound return this.substitute(substitution).isLowerBound(bound.substitute(substitution);
isLowerBound in class ParameterBoundbound - the other boundsubstitution - the type substitutionpublic boolean isSubtypeOf(ParameterBound bound)
ParameterBoundisSubtypeOf in class ParameterBoundbound - the other boundpublic boolean isUpperBound(Type argType, Substitution subst)
ParameterBoundisUpperBound in class ParameterBoundargType - the concrete argument typesubst - the substitutionboolean isUpperBound(ParameterBound bound, Substitution substitution)
ParameterBoundisUpperBound in class ParameterBoundbound - the other boundsubstitution - the type substitution