Package net.bytebuddy.description.type
Interface TypeList.Generic
- All Superinterfaces:
Collection<TypeDescription.Generic>
,FilterableList<TypeDescription.Generic,
,TypeList.Generic> Iterable<TypeDescription.Generic>
,List<TypeDescription.Generic>
- All Known Implementing Classes:
TypeDescription.Generic.LazyProjection.WithLazyNavigation.LazyInterfaceList
,TypeDescription.Generic.OfParameterizedType.ForLoadedType.ParameterArgumentTypeList
,TypeDescription.Generic.OfTypeVariable.ForLoadedType.TypeVariableBoundList
,TypeDescription.Generic.OfWildcardType.ForLoadedType.WildcardLowerBoundTypeList
,TypeDescription.Generic.OfWildcardType.ForLoadedType.WildcardUpperBoundTypeList
,TypeDescription.SuperTypeLoading.ClassLoadingTypeList
,TypeList.Generic.AbstractBase
,TypeList.Generic.Empty
,TypeList.Generic.Explicit
,TypeList.Generic.ForDetachedTypes
,TypeList.Generic.ForDetachedTypes.OfTypeVariables
,TypeList.Generic.ForDetachedTypes.WithResolvedErasure
,TypeList.Generic.ForLoadedTypes
,TypeList.Generic.ForLoadedTypes.OfTypeVariables
,TypeList.Generic.OfConstructorExceptionTypes
,TypeList.Generic.OfLoadedInterfaceTypes
,TypeList.Generic.OfMethodExceptionTypes
,TypePool.Default.LazyTypeDescription.GenericTypeToken.ForTypeVariable.Formal.LazyTypeVariable.LazyBoundTokenList
,TypePool.Default.LazyTypeDescription.GenericTypeToken.LazyTokenList
,TypePool.Default.LazyTypeDescription.GenericTypeToken.LazyTokenList.ForWildcardBound
,TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.Raw.RawAnnotatedType.LazyRawAnnotatedTypeList
,TypePool.Default.LazyTypeDescription.LazyMethodDescription.LazyParameterizedReceiverType.TypeArgumentList
,TypePool.Default.LazyTypeDescription.TokenizedGenericType.Malformed.TokenList
,TypePool.Default.LazyTypeDescription.TokenizedGenericType.TokenList
,TypePool.Default.LazyTypeDescription.TokenizedGenericType.TypeVariableList
- Enclosing interface:
- TypeList
public static interface TypeList.Generic
extends FilterableList<TypeDescription.Generic,TypeList.Generic>
A list containing descriptions of generic types.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
An abstract base implementation of a generic type list.static class
An empty list of generic types.static class
An explicit list of generic types.static class
A list of detached types that are attached on reception.static class
A list of loaded generic types.static class
A lazy projection of a constructor's exception types.static class
A lazy projection of a type's generic interface types.static class
A lazy projection of a method's exception types. -
Method Summary
Modifier and TypeMethodDescriptionaccept
(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor) Transforms the generic types by applying the supplied visitor to each of them.Returns a list of the generic types' erasures.Returns a list of the generic types' raw types.asTokenList
(ElementMatcher<? super TypeDescription> visitor) Transforms a list of attached type variables into their tokenized form.int
Returns the sum of the size of all types contained in this list.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface net.bytebuddy.matcher.FilterableList
filter, getOnly, subList
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, toArray, toArray
-
Method Details
-
asErasures
TypeList asErasures()Returns a list of the generic types' erasures.- Returns:
- A list of the generic types' erasures.
-
asRawTypes
TypeList.Generic asRawTypes()Returns a list of the generic types' raw types.- Returns:
- A list of the generic types' raw types.
-
asTokenList
ByteCodeElement.Token.TokenList<TypeVariableToken> asTokenList(ElementMatcher<? super TypeDescription> visitor) Transforms a list of attached type variables into their tokenized form. Calling this method throws anIllegalStateException
if any type in this list does not represent a type variable (TypeDefinition.Sort.VARIABLE
).- Parameters:
visitor
- The visitor to use for detaching the type variable's bounds.- Returns:
- A list of tokens representing the type variables contained in this list.
-
accept
Transforms the generic types by applying the supplied visitor to each of them.- Parameters:
visitor
- The visitor to apply to each type.- Returns:
- A list of the types returned by the supplied visitor.
-
getStackSize
int getStackSize()Returns the sum of the size of all types contained in this list.- Returns:
- The sum of the size of all types contained in this list.
-