Package net.bytebuddy.description
Class ByteCodeElement.Token.TokenList<S extends ByteCodeElement.Token<S>>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
net.bytebuddy.matcher.FilterableList.AbstractBase<S,ByteCodeElement.Token.TokenList<S>>
net.bytebuddy.description.ByteCodeElement.Token.TokenList<S>
- Type Parameters:
S
- The actual token type.
- All Implemented Interfaces:
Iterable<S>
,Collection<S>
,List<S>
,FilterableList<S,
ByteCodeElement.Token.TokenList<S>>
- Enclosing interface:
- ByteCodeElement.Token<T extends ByteCodeElement.Token<T>>
public static class ByteCodeElement.Token.TokenList<S extends ByteCodeElement.Token<S>>
extends FilterableList.AbstractBase<S,ByteCodeElement.Token.TokenList<S>>
A list of tokens.
-
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>> -
Field Summary
FieldsModifier and TypeFieldDescriptionThe tokens that this list represents.Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept
(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor) Transforms all tokens that are represented by this list.get
(int index) int
size()
protected ByteCodeElement.Token.TokenList<S>
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, 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, toArray
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, toArray, toArray
-
Field Details
-
tokens
The tokens that this list represents.
-
-
Constructor Details
-
TokenList
Creates a list of tokens.- Parameters:
token
- The tokens that this list represents.
-
TokenList
Creates a list of tokens.- Parameters:
tokens
- The tokens that this list represents.
-
-
Method Details
-
accept
public ByteCodeElement.Token.TokenList<S> accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor) Transforms all tokens that are represented by this list.- Parameters:
visitor
- The visitor to apply to all tokens.- Returns:
- A list containing the transformed tokens.
-
wrap
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<S extends ByteCodeElement.Token<S>,
ByteCodeElement.Token.TokenList<S extends ByteCodeElement.Token<S>>> - Parameters:
values
- The values to wrap in an instance of this list's type.- Returns:
- A wrapped instance of the given
values
.
-
get
- Specified by:
get
in interfaceList<S extends ByteCodeElement.Token<S>>
- Specified by:
get
in classAbstractList<S extends ByteCodeElement.Token<S>>
-
size
public int size()- Specified by:
size
in interfaceCollection<S extends ByteCodeElement.Token<S>>
- Specified by:
size
in interfaceList<S extends ByteCodeElement.Token<S>>
- Specified by:
size
in classAbstractCollection<S extends ByteCodeElement.Token<S>>
-