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>>
-
-
Constructor Summary
Constructors Constructor Description Token(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordComponentDescription.Token
accept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Transforms the types represented by this token by applying the given visitor to them.boolean
equals(Object other)
AnnotationList
getAnnotations()
Returns the token's annotations.String
getName()
Returns the token's name.TypeDescription.Generic
getType()
Returns the token's type.int
hashCode()
-
-
-
Constructor Detail
-
Token
public Token(String name, TypeDescription.Generic type)
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 Detail
-
getName
public String getName()
Returns the token's name.- Returns:
- The token's name.
-
getType
public TypeDescription.Generic getType()
Returns the token's type.- Returns:
- The token's type.
-
getAnnotations
public AnnotationList 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.
-
-