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:
java.lang.Iterable<S>
,java.util.Collection<S>
,java.util.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>>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteCodeElement.Token.TokenList<S>
accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Transforms all tokens that are represented by this list.S
get(int index)
int
size()
protected ByteCodeElement.Token.TokenList<S>
wrap(java.util.List<S> 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, 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
-
-
-
-
Field Detail
-
tokens
private final java.util.List<? extends S extends ByteCodeElement.Token<S>> tokens
The tokens that this list represents.
-
-
Method Detail
-
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
protected ByteCodeElement.Token.TokenList<S> wrap(java.util.List<S> 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<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
public S get(int index)
- Specified by:
get
in interfacejava.util.List<S extends ByteCodeElement.Token<S>>
- Specified by:
get
in classjava.util.AbstractList<S extends ByteCodeElement.Token<S>>
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<S extends ByteCodeElement.Token<S>>
- Specified by:
size
in interfacejava.util.List<S extends ByteCodeElement.Token<S>>
- Specified by:
size
in classjava.util.AbstractCollection<S extends ByteCodeElement.Token<S>>
-
-