public static class FieldDescription.Token extends Object implements ByteCodeElement.Token<FieldDescription.Token>
ByteCodeElement.Token.TokenList<S extends ByteCodeElement.Token<S>>
Constructor and Description |
---|
Token(String name,
int modifiers,
TypeDescription.Generic type)
Creates a new field token without annotations.
|
Token(String name,
int modifiers,
TypeDescription.Generic type,
List<? extends AnnotationDescription> annotations)
Creates a new field token.
|
Modifier and Type | Method and Description |
---|---|
FieldDescription.Token |
accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Transforms the types represented by this token by applying the given visitor to them.
|
FieldDescription.SignatureToken |
asSignatureToken(TypeDescription declaringType)
Creates a signature token that represents the method that is represented by this token.
|
boolean |
equals(Object other) |
AnnotationList |
getAnnotations()
Returns the annotations of the represented field.
|
int |
getModifiers()
Returns the modifiers of the represented field.
|
String |
getName()
Returns the name of the represented field.
|
TypeDescription.Generic |
getType()
Returns the type of the represented field.
|
int |
hashCode() |
String |
toString() |
public Token(String name, int modifiers, TypeDescription.Generic type)
name
- The name of the represented field.modifiers
- The modifiers of the represented field.type
- The type of the represented field.public Token(String name, int modifiers, TypeDescription.Generic type, List<? extends AnnotationDescription> annotations)
name
- The name of the represented field.modifiers
- The modifiers of the represented field.type
- The type of the represented field.annotations
- The annotations of the represented field.public String getName()
public TypeDescription.Generic getType()
public int getModifiers()
public AnnotationList getAnnotations()
public FieldDescription.Token accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
ByteCodeElement.Token
accept
in interface ByteCodeElement.Token<FieldDescription.Token>
visitor
- The visitor to transform all types that are represented by this token.public FieldDescription.SignatureToken asSignatureToken(TypeDescription declaringType)
declaringType
- The declaring type of the field that this token represents.Copyright © 2014–2016. All rights reserved.