class LazyParameterBound extends ParameterBound
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
LazyParameterBound.LazyBoundException
There was an attempt to perform an operation, such as capture conversion, on a lazy bound.
|
| Modifier and Type | Field and Description |
|---|---|
private java.lang.reflect.Type |
boundType
The type for this bound.
|
| Constructor and Description |
|---|
LazyParameterBound(java.lang.reflect.Type boundType)
Creates a
LazyParameterBound from the given rawtype and type parameters. |
| Modifier and Type | Method and Description |
|---|---|
ParameterBound |
applyCaptureConversion()
Applies a capture conversion to any wildcard arguments in the type of this bound.
|
boolean |
equals(@Nullable java.lang.Object obj) |
java.util.List<TypeVariable> |
getTypeParameters()
Returns any type parameters in the type of this bound.
|
private static java.util.List<TypeVariable> |
getTypeParameters(java.lang.reflect.Type type)
Collects the type parameters from the given reflection
Type object. |
boolean |
hasCaptureVariable()
Indicates whether the type of this bound has a capture variable.
|
private static boolean |
hasCaptureVariable(java.lang.reflect.Type type)
Return true if the given type has a capture variable.
|
int |
hashCode() |
(package private) boolean |
hasWildcard()
Indicates whether the type of this bound has a wildcard type argument.
|
private static boolean |
hasWildcard(java.lang.reflect.Type type) |
boolean |
isGeneric(boolean ignoreWildcards)
Indicates whether the type of this bound is generic.
|
boolean |
isLowerBound(Type argType,
Substitution substitution)
Indicates whether this bound is a lower bound of the given argument type.
|
boolean |
isObject()
Indicate whether this bound is
Object. |
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.
|
boolean |
isVariable()
Indicates whether this bound is a type variable.
|
ParameterBound |
substitute(Substitution substitution)
Applies the given substitution to this type bound by replacing type variables.
|
private static TypeArgument |
substitute(java.lang.reflect.Type type,
Substitution substitution)
Applies a substitution to a reflection type that occurs as an actual argument of a
parameterized type bound, to create a type argument to a
ParameterizedType. |
java.lang.String |
toString() |
forType, forType, forTypes, isGeneric, isLowerBound, isTypeVariableLazyParameterBound(java.lang.reflect.Type boundType)
LazyParameterBound from the given rawtype and type parameters.boundType - the reflection type for this boundpublic boolean equals(@Nullable java.lang.Object obj)
equals in class java.lang.ObjectLazyParameterBound, and the rawtype and parameters are
identical, false otherwisepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic ParameterBound substitute(Substitution substitution)
ParameterBoundsubstitute in class ParameterBoundsubstitution - the type substitutionprivate static TypeArgument substitute(java.lang.reflect.Type type, Substitution substitution)
ParameterizedType.type - the reflection typesubstitution - the type substitutionpublic ParameterBound applyCaptureConversion()
ParameterBoundapplyCaptureConversion in class ParameterBoundReferenceType.applyCaptureConversion()public java.util.List<TypeVariable> getTypeParameters()
ParameterBoundgetTypeParameters in class ParameterBoundTypeVariable objects in this boundprivate static java.util.List<TypeVariable> getTypeParameters(java.lang.reflect.Type type)
Type object.type - the Type referenceboolean hasWildcard()
ParameterBoundhasWildcard in class ParameterBoundprivate static boolean hasWildcard(java.lang.reflect.Type type)
public boolean hasCaptureVariable()
ParameterBoundhasCaptureVariable in class ParameterBoundprivate static boolean hasCaptureVariable(java.lang.reflect.Type type)
type - the type to testpublic boolean isGeneric(boolean ignoreWildcards)
ParameterBoundisGeneric in class ParameterBoundignoreWildcards - if true, ignore wildcards; that is, treat wildcards as not making the
operation genericpublic boolean isLowerBound(Type argType, Substitution substitution)
ParameterBoundisLowerBound in class ParameterBoundargType - the concrete argument typesubstitution - the substitutionpublic boolean isObject()
ParameterBoundObject.isObject in class ParameterBoundObject, false otherwisepublic boolean isSubtypeOf(ParameterBound boundType)
ParameterBoundisSubtypeOf in class ParameterBoundboundType - the other boundpublic boolean isUpperBound(Type argType, Substitution substitution)
This generic type bound is satisfied by a concrete type if the concrete type formed by applying the substitution to this generic bound is satisfied by the concrete type.
isUpperBound in class ParameterBoundargType - the concrete argument typesubstitution - the substitutionboolean isUpperBound(ParameterBound bound, Substitution substitution)
ParameterBoundisUpperBound in class ParameterBoundbound - the other boundsubstitution - the type substitutionpublic boolean isVariable()
ParameterBoundisVariable in class ParameterBound