public static class ParameterDescription.Token extends Object implements ByteCodeElement.Token<ParameterDescription.Token>
Modifier and Type | Class and Description |
---|---|
static class |
ParameterDescription.Token.TypeList
A list of types represented as a list of parameter tokens.
|
ByteCodeElement.Token.TokenList<S extends ByteCodeElement.Token<S>>
Modifier and Type | Field and Description |
---|---|
static Integer |
NO_MODIFIERS
Indicator for a method parameter without explicit modifiers.
|
static String |
NO_NAME
Indicator for a method parameter without an explicit name.
|
Constructor and Description |
---|
Token(GenericTypeDescription typeDescription)
Creates a new parameter token without an explicit name, an explicit modifier or annotations.
|
Token(GenericTypeDescription typeDescription,
List<? extends AnnotationDescription> annotationDescriptions)
Creates a new parameter token without an explicit name or an explicit modifier.
|
Token(GenericTypeDescription typeDescription,
List<? extends AnnotationDescription> annotationDescriptions,
String name,
Integer modifiers)
Creates a new parameter token.
|
Modifier and Type | Method and Description |
---|---|
ParameterDescription.Token |
accept(GenericTypeDescription.Visitor<? extends GenericTypeDescription> visitor)
Transforms the types represented by this token by applying the given visitor to them.
|
boolean |
equals(Object other) |
AnnotationList |
getAnnotations()
Returns the annotations of the represented method parameter.
|
Integer |
getModifiers()
Returns the modifiers of the represented method parameter.
|
String |
getName()
Returns the name of the represented method parameter.
|
GenericTypeDescription |
getType()
Returns the type of the represented method parameter.
|
int |
hashCode() |
boolean |
isIdenticalTo(ParameterDescription.Token token)
Checks if this token is fully identical to the provided token.
|
String |
toString() |
public static final String NO_NAME
public static final Integer NO_MODIFIERS
public Token(GenericTypeDescription typeDescription)
typeDescription
- The type of the represented parameter.public Token(GenericTypeDescription typeDescription, List<? extends AnnotationDescription> annotationDescriptions)
typeDescription
- The type of the represented parameter.annotationDescriptions
- The annotations of the parameter.public Token(GenericTypeDescription typeDescription, List<? extends AnnotationDescription> annotationDescriptions, String name, Integer modifiers)
typeDescription
- The type of the represented parameter.annotationDescriptions
- The annotations of the parameter.name
- The name of the parameter or null
if no explicit name is defined.modifiers
- The modifiers of the parameter or null
if no explicit modifiers is defined.public GenericTypeDescription getType()
public AnnotationList getAnnotations()
public String getName()
null
if no explicit name is defined.public Integer getModifiers()
null
if no explicit modifiers is defined.public ParameterDescription.Token accept(GenericTypeDescription.Visitor<? extends GenericTypeDescription> visitor)
ByteCodeElement.Token
accept
in interface ByteCodeElement.Token<ParameterDescription.Token>
visitor
- The visitor to transform all types that are represented by this token.public boolean isIdenticalTo(ParameterDescription.Token token)
ByteCodeElement.Token
isIdenticalTo
in interface ByteCodeElement.Token<ParameterDescription.Token>
token
- The token to compare this token with.true
if this token is identical to the given token.Copyright © 2014–2015. All rights reserved.