public static class MethodDescription.Token extends java.lang.Object implements ByteCodeElement.Token<MethodDescription.Token>
ByteCodeElement.Token.TokenList<S extends ByteCodeElement.Token<S>>| Modifier and Type | Field and Description |
|---|---|
private java.util.List<? extends AnnotationDescription> |
annotations
The annotations of the represented method.
|
private AnnotationValue<?,?> |
defaultValue
The default value of the represented method or
null if no such value exists. |
private java.util.List<? extends TypeDescription.Generic> |
exceptionTypes
The exception types of the represented method.
|
private int |
modifiers
The modifiers of the represented method.
|
private java.lang.String |
name
The internal name of the represented method.
|
private java.util.List<? extends ParameterDescription.Token> |
parameterTokens
The parameter tokens of the represented method.
|
private TypeDescription.Generic |
receiverType
The receiver type of the represented method or
null if the receiver type is implicit. |
private TypeDescription.Generic |
returnType
The return type of the represented method.
|
private java.util.List<? extends TypeVariableToken> |
typeVariableTokens
A list of tokens representing the method's type variables.
|
| Constructor and Description |
|---|
Token(int modifiers)
Creates a new method token representing a constructor without any parameters, exception types, type variables or annotations.
|
Token(java.lang.String name,
int modifiers,
java.util.List<? extends TypeVariableToken> typeVariableTokens,
TypeDescription.Generic returnType,
java.util.List<? extends ParameterDescription.Token> parameterTokens,
java.util.List<? extends TypeDescription.Generic> exceptionTypes,
java.util.List<? extends AnnotationDescription> annotations,
AnnotationValue<?,?> defaultValue,
TypeDescription.Generic receiverType)
Creates a new token for a method description.
|
Token(java.lang.String name,
int modifiers,
TypeDescription.Generic returnType)
Creates a new method token representing a method without any parameters, exception types, type variables or annotations.
|
Token(java.lang.String name,
int modifiers,
TypeDescription.Generic returnType,
java.util.List<? extends TypeDescription.Generic> parameterTypes)
Creates a new method token with simple values.
|
| Modifier and Type | Method and Description |
|---|---|
MethodDescription.Token |
accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Transforms the types represented by this token by applying the given visitor to them.
|
MethodDescription.SignatureToken |
asSignatureToken(TypeDescription declaringType)
Creates a signature token that represents the method that is represented by this token.
|
boolean |
equals(java.lang.Object other) |
AnnotationList |
getAnnotations()
Returns the annotations of the represented method.
|
AnnotationValue<?,?> |
getDefaultValue()
Returns the default value of the represented method.
|
TypeList.Generic |
getExceptionTypes()
Returns the exception types of the represented method.
|
int |
getModifiers()
Returns the modifiers of the represented method.
|
java.lang.String |
getName()
Returns the internal name of the represented method.
|
ByteCodeElement.Token.TokenList<ParameterDescription.Token> |
getParameterTokens()
Returns the parameter tokens of the represented method.
|
TypeDescription.Generic |
getReceiverType()
Returns the receiver type of this token or
null if the receiver type is implicit. |
TypeDescription.Generic |
getReturnType()
Returns the return type of the represented method.
|
ByteCodeElement.Token.TokenList<TypeVariableToken> |
getTypeVariableTokens()
Returns the type variables of this method token.
|
int |
hashCode() |
java.lang.String |
toString() |
private final java.lang.String name
private final int modifiers
private final java.util.List<? extends TypeVariableToken> typeVariableTokens
private final TypeDescription.Generic returnType
private final java.util.List<? extends ParameterDescription.Token> parameterTokens
private final java.util.List<? extends TypeDescription.Generic> exceptionTypes
private final java.util.List<? extends AnnotationDescription> annotations
private final AnnotationValue<?,?> defaultValue
null if no such value exists.private final TypeDescription.Generic receiverType
null if the receiver type is implicit.public Token(int modifiers)
modifiers - The constructor's modifiers.public Token(java.lang.String name,
int modifiers,
TypeDescription.Generic returnType)
name - The name of the method.modifiers - The modifiers of the method.returnType - The return type of the method.public Token(java.lang.String name,
int modifiers,
TypeDescription.Generic returnType,
java.util.List<? extends TypeDescription.Generic> parameterTypes)
name - The internal name of the represented method.modifiers - The modifiers of the represented method.returnType - The return type of the represented method.parameterTypes - The parameter types of this method.public Token(java.lang.String name,
int modifiers,
java.util.List<? extends TypeVariableToken> typeVariableTokens,
TypeDescription.Generic returnType,
java.util.List<? extends ParameterDescription.Token> parameterTokens,
java.util.List<? extends TypeDescription.Generic> exceptionTypes,
java.util.List<? extends AnnotationDescription> annotations,
AnnotationValue<?,?> defaultValue,
TypeDescription.Generic receiverType)
name - The internal name of the represented method.modifiers - The modifiers of the represented method.typeVariableTokens - The type variables of the the represented method.returnType - The return type of the represented method.parameterTokens - The parameter tokens of the represented method.exceptionTypes - The exception types of the represented method.annotations - The annotations of the represented method.defaultValue - The default value of the represented method or null if no such value exists.receiverType - The receiver type of the represented method or null if the receiver type is implicit.public java.lang.String getName()
public int getModifiers()
public ByteCodeElement.Token.TokenList<TypeVariableToken> getTypeVariableTokens()
public TypeDescription.Generic getReturnType()
public ByteCodeElement.Token.TokenList<ParameterDescription.Token> getParameterTokens()
public TypeList.Generic getExceptionTypes()
public AnnotationList getAnnotations()
public AnnotationValue<?,?> getDefaultValue()
null if no such value exists.public TypeDescription.Generic getReceiverType()
null if the receiver type is implicit.null if the receiver type is implicit.public MethodDescription.Token accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
accept in interface ByteCodeElement.Token<MethodDescription.Token>visitor - The visitor to transform all types that are represented by this token.public MethodDescription.SignatureToken asSignatureToken(TypeDescription declaringType)
declaringType - The declaring type of the method that this token represents.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object