protected static class GenericTypeDescription.Visitor.Substitutor.ForDetachment.DetachedTypeVariable extends GenericTypeDescription.ForTypeVariable.InDetachedForm
GenericTypeDescription.ForTypeVariable.InDetachedForm, GenericTypeDescription.ForTypeVariable.OfLoadedType
GenericTypeDescription.ForGenericArray, GenericTypeDescription.ForNonGenericType, GenericTypeDescription.ForParameterizedType, GenericTypeDescription.ForTypeVariable, GenericTypeDescription.ForWildcardType, GenericTypeDescription.LazyProjection, GenericTypeDescription.Sort, GenericTypeDescription.SuperTypeIterator, GenericTypeDescription.Visitor<T>
NamedElement.WithGenericName, NamedElement.WithRuntimeName
EMPTY_NAME
Modifier | Constructor and Description |
---|---|
protected |
DetachedTypeVariable(String symbol,
List<GenericTypeDescription> bounds,
GenericTypeDescription.Visitor.Substitutor.ForDetachment visitor)
Creates a description of a detached type variable.
|
Modifier and Type | Method and Description |
---|---|
String |
getSymbol()
Returns the symbol of this type variable.
|
GenericTypeList |
getUpperBounds()
Returns the upper bounds of this type.
|
equals, getSort, getVariableSource, hashCode
accept, asErasure, getComponentType, getDeclaredFields, getDeclaredMethods, getInterfaces, getLowerBounds, getOwnerType, getParameters, getSourceCodeName, getStackSize, getSuperType, getTypeName, isArray, isPrimitive, iterator, represents, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected DetachedTypeVariable(String symbol, List<GenericTypeDescription> bounds, GenericTypeDescription.Visitor.Substitutor.ForDetachment visitor)
symbol
- The symbol of this variable.bounds
- The bounds of the type variable.visitor
- The visitor to apply to the bounds.public GenericTypeList getUpperBounds()
GenericTypeDescription
Returns the upper bounds of this type. Any type with a well-defined upper bound is bound by at least one type. If no such
type is defined, the bound is implicitly Object
.
Only non-symbolic type variables (GenericTypeDescription.Sort.VARIABLE
,
GenericTypeDescription.Sort.VARIABLE_DETACHED
) and wildcard types
(GenericTypeDescription.Sort.WILDCARD
) have well-defined upper bounds. For other
types, an IllegalStateException
is thrown.
public String getSymbol()
GenericTypeDescription
GenericTypeDescription.Sort.VARIABLE
,
GenericTypeDescription.Sort.VARIABLE_DETACHED
,
GenericTypeDescription.Sort.VARIABLE_SYMBOLIC
). For other types, this method
throws an IllegalStateException
.Copyright © 2014–2015. All rights reserved.