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 java.lang.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
Fields Modifier and Type Field Description private java.util.List<? extends AnnotationDescription>annotationsThe token's annotations.private java.lang.StringnameThe token's name.private TypeDescription.GenerictypeThe token's type.
-
Constructor Summary
Constructors Constructor Description Token(java.lang.String name, TypeDescription.Generic type)Creates a new record component token without annotations.Token(java.lang.String name, TypeDescription.Generic type, java.util.List<? extends AnnotationDescription> annotations)Creates a new record component token.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordComponentDescription.Tokenaccept(TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)Transforms the types represented by this token by applying the given visitor to them.booleanequals(java.lang.Object other)AnnotationListgetAnnotations()Returns the token's annotations.java.lang.StringgetName()Returns the token's name.TypeDescription.GenericgetType()Returns the token's type.inthashCode()
-
-
-
Field Detail
-
name
private final java.lang.String name
The token's name.
-
type
private final TypeDescription.Generic type
The token's type.
-
annotations
private final java.util.List<? extends AnnotationDescription> annotations
The token's annotations.
-
-
Constructor Detail
-
Token
public Token(java.lang.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(java.lang.String name, TypeDescription.Generic type, java.util.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 java.lang.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:
acceptin 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
@Enhance("hashCode") public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
-