public class TypeVariableToken extends Object implements ByteCodeElement.Token<TypeVariableToken>
ByteCodeElement.Token.TokenList<S extends ByteCodeElement.Token<S>>
Constructor and Description |
---|
TypeVariableToken(String symbol,
List<? extends TypeDescription.Generic> bounds)
Creates a new type variable token without annotations.
|
TypeVariableToken(String symbol,
List<? extends TypeDescription.Generic> bounds,
List<? extends AnnotationDescription> annotations)
Creates a new type variable token.
|
Modifier and Type | Method and Description |
---|---|
TypeVariableToken |
accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Transforms the types represented by this token by applying the given visitor to them.
|
boolean |
equals(Object other) |
AnnotationList |
getAnnotations()
Returns the annotations on this type variable.
|
TypeList.Generic |
getBounds()
Returns the type variable's upper bounds.
|
String |
getSymbol()
Returns the type variable's symbol.
|
int |
hashCode() |
static TypeVariableToken |
of(TypeDescription.Generic typeVariable,
ElementMatcher<? super TypeDescription> matcher)
Transforms a type variable into a type variable token with its bounds detached.
|
String |
toString() |
public TypeVariableToken(String symbol, List<? extends TypeDescription.Generic> bounds)
symbol
- The type variable's symbol.bounds
- The type variable's upper bounds.public TypeVariableToken(String symbol, List<? extends TypeDescription.Generic> bounds, List<? extends AnnotationDescription> annotations)
symbol
- The type variable's symbol.bounds
- The type variable's upper bounds.annotations
- The annotations of the type variable.public static TypeVariableToken of(TypeDescription.Generic typeVariable, ElementMatcher<? super TypeDescription> matcher)
typeVariable
- A type variable in its attached state.matcher
- A matcher that identifies types to detach from the upper bound types.public String getSymbol()
public TypeList.Generic getBounds()
public AnnotationList getAnnotations()
public TypeVariableToken accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
accept
in interface ByteCodeElement.Token<TypeVariableToken>
visitor
- The visitor to transform all types that are represented by this token.@CachedReturnPlugin.Enhance public int hashCode()
Copyright © 2014–2020. All rights reserved.