class LazyReferenceBound extends ReferenceBound
LazyParameterBound, but this class uses ReferenceType as the bound instead of
java.lang.reflect.Type. Also, prevents access to recursive type bounds, that would
otherwise result in nonterminating calls to getTypeParameters().
Objects of this class are created by LazyParameterBound.substitute(Substitution) when
the substitution would replace a type variable with another type variable.
| Constructor and Description |
|---|
LazyReferenceBound(ReferenceType boundType) |
| Modifier and Type | Method and Description |
|---|---|
ReferenceBound |
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.
|
int |
hashCode() |
boolean |
isLowerBound(Type argType,
Substitution substitution)
Indicates whether this bound is a lower bound of the given argument type.
|
boolean |
isSubtypeOf(ParameterBound boundType)
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 substitution)
Determines if this bound is an upper bound for the argument type.
|
ReferenceBound |
substitute(Substitution substitution)
Applies the given substitution to this type bound by replacing type variables.
|
equals, getBoundType, hasCaptureVariable, hasWildcard, isGeneric, isObject, isVariable, toStringforType, forType, forTypes, isGeneric, isLowerBound, isTypeVariableLazyReferenceBound(ReferenceType boundType)
public int hashCode()
LazyReferenceBound can be part of a recursive type, and so the hash code is based on
the string representation of the bound to avoid recursive calls on hashCode().
hashCode in class ReferenceBoundpublic ReferenceBound substitute(Substitution substitution)
ParameterBoundsubstitute in class ReferenceBoundsubstitution - the type substitutionpublic ReferenceBound 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 substitution)
ParameterBoundisLowerBound in class ParameterBoundargType - the concrete argument typesubstitution - the substitutionpublic boolean isSubtypeOf(ParameterBound boundType)
ParameterBoundisSubtypeOf in class ParameterBoundboundType - the other boundpublic boolean isUpperBound(Type argType, Substitution substitution)
ParameterBoundisUpperBound in class ParameterBoundargType - the concrete argument typesubstitution - the substitutionboolean isUpperBound(ParameterBound bound, Substitution substitution)
ParameterBoundisUpperBound in class ParameterBoundbound - the other boundsubstitution - the type substitution