Class TypeList.Generic.Empty
java.lang.Object
java.util.AbstractCollection<TypeDescription.Generic>
java.util.AbstractList<TypeDescription.Generic>
net.bytebuddy.matcher.FilterableList.Empty<TypeDescription.Generic, TypeList.Generic>
net.bytebuddy.description.type.TypeList.Generic.Empty
- All Implemented Interfaces:
Iterable<TypeDescription.Generic>, Collection<TypeDescription.Generic>, List<TypeDescription.Generic>, SequencedCollection<TypeDescription.Generic>, TypeList.Generic, FilterableList<TypeDescription.Generic, TypeList.Generic>
- Enclosing interface:
TypeList.Generic
public static class TypeList.Generic.Empty
extends FilterableList.Empty<TypeDescription.Generic, TypeList.Generic>
implements TypeList.Generic
An empty list of generic types.
-
Nested Class Summary
Nested classes/interfaces inherited from interface FilterableList
FilterableList.AbstractBase<T,S>, FilterableList.Empty<T, S> Nested classes/interfaces inherited from interface 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 AbstractList
modCount -
Constructor Summary
Constructors -
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> matcher) Transforms a list of attached type variables into their tokenized form.intReturns the sum of the size of all types contained in this list.Methods inherited from class AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, setMethods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface FilterableList
filter, getOnly, subListMethods inherited from interface List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, toArray, toArray
-
Constructor Details
-
Empty
public Empty()
-
-
Method Details
-
asErasures
Returns a list of the generic types' erasures.- Specified by:
asErasuresin interfaceTypeList.Generic- Returns:
- A list of the generic types' erasures.
-
asRawTypes
Returns a list of the generic types' raw types.- Specified by:
asRawTypesin interfaceTypeList.Generic- Returns:
- A list of the generic types' raw types.
-
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.
-