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:
java.lang.Iterable<TypeDescription.Generic>,java.util.Collection<TypeDescription.Generic>,java.util.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.LazyMethodDescription.LazyParameterizedReceiverType.TypeArgumentList,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
-
-
Constructor Summary
Constructors Constructor Description AbstractBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeList.Genericaccept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)Transforms the generic types by applying the supplied visitor to each of them.TypeListasErasures()Returns a list of the generic types' erasures.TypeList.GenericasRawTypes()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.intgetStackSize()Returns the sum of the size of all types contained in this list.protected TypeList.Genericwrap(java.util.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 net.bytebuddy.matcher.FilterableList
filter, getOnly, subList
-
-
-
-
Method Detail
-
wrap
protected TypeList.Generic wrap(java.util.List<TypeDescription.Generic> values)
Description copied from class:FilterableList.AbstractBaseRepresents a list of values as an instance of this instance's list type.- Specified by:
wrapin 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:
acceptin 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 anIllegalStateExceptionif any type in this list does not represent a type variable (TypeDefinition.Sort.VARIABLE).- Specified by:
asTokenListin 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:
getStackSizein 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:
asErasuresin 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:
asRawTypesin interfaceTypeList.Generic- Returns:
- A list of the generic types' raw types.
-
-