Package net.bytebuddy.description.type
Class RecordComponentDescription.Token
java.lang.Object
net.bytebuddy.description.type.RecordComponentDescription.Token
- All Implemented Interfaces:
ByteCodeElement.Token<RecordComponentDescription.Token>
- Enclosing interface:
- RecordComponentDescription
public static class RecordComponentDescription.Token
extends Object
implements ByteCodeElement.Token<RecordComponentDescription.Token>
A token representing a record component's properties detached from a type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.description.ByteCodeElement.Token
ByteCodeElement.Token.TokenList<S extends ByteCodeElement.Token<S>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<? extends AnnotationDescription>
The token's annotations.private final String
The token's name.private final TypeDescription.Generic
The token's type. -
Constructor Summary
ConstructorsConstructorDescriptionToken
(String name, TypeDescription.Generic type) Creates a new record component token without annotations.Token
(String name, TypeDescription.Generic type, List<? extends AnnotationDescription> annotations) Creates a new record component token. -
Method Summary
Modifier and TypeMethodDescriptionaccept
(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor) Transforms the types represented by this token by applying the given visitor to them.boolean
Returns the token's annotations.getName()
Returns the token's name.getType()
Returns the token's type.int
hashCode()
-
Field Details
-
name
The token's name. -
type
The token's type. -
annotations
The token's annotations.
-
-
Constructor Details
-
Token
Creates a new record component token without annotations.- Parameters:
name
- The token's name.type
- The token's type.
-
Token
public Token(String name, TypeDescription.Generic type, List<? extends AnnotationDescription> annotations) Creates a new record component token.- Parameters:
name
- The token's name.type
- The token's type.annotations
- The token's annotations.
-
-
Method Details
-
getName
Returns the token's name.- Returns:
- The token's name.
-
getType
Returns the token's type.- Returns:
- The token's type.
-
getAnnotations
Returns the token's annotations.- Returns:
- The token's annotations.
-
accept
public RecordComponentDescription.Token accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor) Transforms the types represented by this token by applying the given visitor to them.- Specified by:
accept
in interfaceByteCodeElement.Token<RecordComponentDescription.Token>
- Parameters:
visitor
- The visitor to transform all types that are represented by this token.- Returns:
- This token with all of its represented types transformed by the supplied visitor.
-
hashCode
-
equals
-