Package net.bytebuddy.description.type
Class TypeList.Generic.AbstractBase
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- net.bytebuddy.matcher.FilterableList.AbstractBase<TypeDescription.Generic,TypeList.Generic>
-
- net.bytebuddy.description.type.TypeList.Generic.AbstractBase
-
- All Implemented Interfaces:
Iterable<TypeDescription.Generic>
,Collection<TypeDescription.Generic>
,List<TypeDescription.Generic>
,TypeList.Generic
,FilterableList<TypeDescription.Generic,TypeList.Generic>
- Direct Known Subclasses:
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.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.TokenizedGenericType.Malformed.TokenList
,TypePool.Default.LazyTypeDescription.TokenizedGenericType.TokenList
,TypePool.Default.LazyTypeDescription.TokenizedGenericType.TypeVariableList
- Enclosing interface:
- TypeList.Generic
public abstract static class TypeList.Generic.AbstractBase extends FilterableList.AbstractBase<TypeDescription.Generic,TypeList.Generic> implements TypeList.Generic
An abstract base implementation of a generic type list.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.FilterableList
FilterableList.AbstractBase<T,S extends FilterableList<T,S>>, FilterableList.Empty<T,S extends FilterableList<T,S>>
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.TypeList.Generic
TypeList.Generic.AbstractBase, TypeList.Generic.Empty, TypeList.Generic.Explicit, TypeList.Generic.ForDetachedTypes, TypeList.Generic.ForLoadedTypes, TypeList.Generic.OfConstructorExceptionTypes, TypeList.Generic.OfLoadedInterfaceTypes, TypeList.Generic.OfMethodExceptionTypes
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description AbstractBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeList.Generic
accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Transforms the generic types by applying the supplied visitor to each of them.TypeList
asErasures()
Returns a list of the generic types' erasures.TypeList.Generic
asRawTypes()
Returns a list of the generic types' raw types.ByteCodeElement.Token.TokenList<TypeVariableToken>
asTokenList(ElementMatcher<? super TypeDescription> matcher)
Transforms a list of attached type variables into their tokenized form.int
getStackSize()
Returns the sum of the size of all types contained in this list.protected TypeList.Generic
wrap(List<TypeDescription.Generic> values)
Represents a list of values as an instance of this instance's list type.-
Methods inherited from class net.bytebuddy.matcher.FilterableList.AbstractBase
filter, getOnly, subList
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
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 Detail
-
wrap
protected TypeList.Generic wrap(List<TypeDescription.Generic> values)
Description copied from class:FilterableList.AbstractBase
Represents a list of values as an instance of this instance's list type.- Specified by:
wrap
in classFilterableList.AbstractBase<TypeDescription.Generic,TypeList.Generic>
- Parameters:
values
- The values to wrap in an instance of this list's type.- Returns:
- A wrapped instance of the given
values
.
-
accept
public TypeList.Generic accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Transforms the generic types by applying the supplied visitor to each of them.- Specified by:
accept
in interfaceTypeList.Generic
- Parameters:
visitor
- The visitor to apply to each type.- Returns:
- A list of the types returned by the supplied visitor.
-
asTokenList
public ByteCodeElement.Token.TokenList<TypeVariableToken> asTokenList(ElementMatcher<? super TypeDescription> matcher)
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
).- Specified by:
asTokenList
in interfaceTypeList.Generic
- Parameters:
matcher
- The visitor to use for detaching the type variable's bounds.- Returns:
- A list of tokens representing the type variables contained in this list.
-
getStackSize
public int getStackSize()
Returns the sum of the size of all types contained in this list.- Specified by:
getStackSize
in interfaceTypeList.Generic
- Returns:
- The sum of the size of all types contained in this list.
-
asErasures
public TypeList asErasures()
Returns a list of the generic types' erasures.- Specified by:
asErasures
in interfaceTypeList.Generic
- Returns:
- A list of the generic types' erasures.
-
asRawTypes
public TypeList.Generic asRawTypes()
Returns a list of the generic types' raw types.- Specified by:
asRawTypes
in interfaceTypeList.Generic
- Returns:
- A list of the generic types' raw types.
-
-