Package net.bytebuddy.description.type
Class TypeList.Generic.ForDetachedTypes
- 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
-
- net.bytebuddy.description.type.TypeList.Generic.ForDetachedTypes
-
- 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>
- Enclosing interface:
- TypeList.Generic
public static class TypeList.Generic.ForDetachedTypes extends TypeList.Generic.AbstractBase
A list of detached types that are attached on reception.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TypeList.Generic.ForDetachedTypes.OfTypeVariables
A list of attached type variables represented by a list of type variable tokens.static class
TypeList.Generic.ForDetachedTypes.WithResolvedErasure
A list of detached types that are attached on reception but not when computing an erasure.-
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 Modifier and Type Field Description private java.util.List<? extends TypeDescription.Generic>
detachedTypes
The detached types this list represents.private TypeDescription.Generic.Visitor<? extends TypeDescription.Generic>
visitor
The visitor to use for attaching the detached types.
-
Constructor Summary
Constructors Constructor Description ForDetachedTypes(java.util.List<? extends TypeDescription.Generic> detachedTypes, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Creates a list of detached types that are attached on reception.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TypeList.Generic
attach(FieldDescription fieldDescription, java.util.List<? extends TypeDescription.Generic> detachedTypes)
Creates a list of types that are attached to the provided field.static TypeList.Generic
attach(MethodDescription methodDescription, java.util.List<? extends TypeDescription.Generic> detachedTypes)
Creates a list of types that are attached to the provided method.static TypeList.Generic
attach(ParameterDescription parameterDescription, java.util.List<? extends TypeDescription.Generic> detachedTypes)
Creates a list of types that are attached to the provided parameter.static TypeList.Generic
attachVariables(MethodDescription methodDescription, java.util.List<? extends TypeVariableToken> detachedTypeVariables)
Creates a list of type variables that are attached to the provided method.static TypeList.Generic
attachVariables(TypeDescription typeDescription, java.util.List<? extends TypeVariableToken> detachedTypeVariables)
Creates a list of type variables that are attached to the provided type.TypeDescription.Generic
get(int index)
int
size()
-
Methods inherited from class net.bytebuddy.description.type.TypeList.Generic.AbstractBase
accept, asErasures, asRawTypes, asTokenList, getStackSize, wrap
-
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 net.bytebuddy.matcher.FilterableList
filter, getOnly, subList
-
-
-
-
Field Detail
-
detachedTypes
private final java.util.List<? extends TypeDescription.Generic> detachedTypes
The detached types this list represents.
-
visitor
private final TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor
The visitor to use for attaching the detached types.
-
-
Constructor Detail
-
ForDetachedTypes
public ForDetachedTypes(java.util.List<? extends TypeDescription.Generic> detachedTypes, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Creates a list of detached types that are attached on reception.- Parameters:
detachedTypes
- The detached types this list represents.visitor
- The visitor to use for attaching the detached types.
-
-
Method Detail
-
attachVariables
public static TypeList.Generic attachVariables(TypeDescription typeDescription, java.util.List<? extends TypeVariableToken> detachedTypeVariables)
Creates a list of type variables that are attached to the provided type.- Parameters:
typeDescription
- The type to which the type variables are to be attached to.detachedTypeVariables
- A mapping of type variable symbols to their detached type variable bounds.- Returns:
- A type list representing the symbolic type variables in their attached state to the given type description.
-
attach
public static TypeList.Generic attach(FieldDescription fieldDescription, java.util.List<? extends TypeDescription.Generic> detachedTypes)
Creates a list of types that are attached to the provided field.- Parameters:
fieldDescription
- The field to which the detached variables are attached to.detachedTypes
- The detached types.- Returns:
- A type list representing the detached types being attached to the provided field description.
-
attach
public static TypeList.Generic attach(MethodDescription methodDescription, java.util.List<? extends TypeDescription.Generic> detachedTypes)
Creates a list of types that are attached to the provided method.- Parameters:
methodDescription
- The method to which the detached variables are attached to.detachedTypes
- The detached types.- Returns:
- A type list representing the detached types being attached to the provided method description.
-
attachVariables
public static TypeList.Generic attachVariables(MethodDescription methodDescription, java.util.List<? extends TypeVariableToken> detachedTypeVariables)
Creates a list of type variables that are attached to the provided method.- Parameters:
methodDescription
- The method to which the type variables are to be attached to.detachedTypeVariables
- A mapping of type variable symbols to their detached type variable bounds.- Returns:
- A type list representing the symbolic type variables in their attached state to the given method description.
-
attach
public static TypeList.Generic attach(ParameterDescription parameterDescription, java.util.List<? extends TypeDescription.Generic> detachedTypes)
Creates a list of types that are attached to the provided parameter.- Parameters:
parameterDescription
- The parameter to which the detached variables are attached to.detachedTypes
- The detached types.- Returns:
- A type list representing the detached types being attached to the provided parameter description.
-
get
public TypeDescription.Generic get(int index)
- Specified by:
get
in interfacejava.util.List<TypeDescription.Generic>
- Specified by:
get
in classjava.util.AbstractList<TypeDescription.Generic>
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<TypeDescription.Generic>
- Specified by:
size
in interfacejava.util.List<TypeDescription.Generic>
- Specified by:
size
in classjava.util.AbstractCollection<TypeDescription.Generic>
-
-