Package net.bytebuddy.description.type
Class TypeList.Generic.Empty
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- 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>
,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 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 Empty()
-
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.-
Methods inherited from class net.bytebuddy.matcher.FilterableList.Empty
filter, get, getOnly, size, subList
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, 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
-
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.
-
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.
-
-