public static class FieldDescription.Token extends java.lang.Object implements ByteCodeElement.Token<FieldDescription.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 field.
|
private int |
modifiers
The modifiers of the represented field.
|
private java.lang.String |
name
The name of the represented field.
|
private TypeDescription.Generic |
type
The type of the represented field.
|
Constructor and Description |
---|
Token(java.lang.String name,
int modifiers,
TypeDescription.Generic type)
Creates a new field token without annotations.
|
Token(java.lang.String name,
int modifiers,
TypeDescription.Generic type,
java.util.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(java.lang.Object other) |
AnnotationList |
getAnnotations()
Returns the annotations of the represented field.
|
int |
getModifiers()
Returns the modifiers of the represented field.
|
java.lang.String |
getName()
Returns the name of the represented field.
|
TypeDescription.Generic |
getType()
Returns the type of the represented field.
|
int |
hashCode() |
private final java.lang.String name
private final int modifiers
private final TypeDescription.Generic type
private final java.util.List<? extends AnnotationDescription> annotations
public Token(java.lang.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(java.lang.String name, int modifiers, TypeDescription.Generic type, java.util.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 java.lang.String getName()
public TypeDescription.Generic getType()
public int getModifiers()
public AnnotationList getAnnotations()
public FieldDescription.Token accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
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.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object