Package net.bytebuddy.description.type
Class RecordComponentDescription.TypeSubstituting
- java.lang.Object
-
- net.bytebuddy.description.type.RecordComponentDescription.AbstractBase
-
- net.bytebuddy.description.type.RecordComponentDescription.TypeSubstituting
-
- All Implemented Interfaces:
AnnotationSource
,ByteCodeElement.TypeDependant<RecordComponentDescription.InDefinedShape,RecordComponentDescription.Token>
,DeclaredByType
,NamedElement
,NamedElement.WithDescriptor
,RecordComponentDescription
,RecordComponentDescription.InGenericShape
- Enclosing interface:
- RecordComponentDescription
public static class RecordComponentDescription.TypeSubstituting extends RecordComponentDescription.AbstractBase implements RecordComponentDescription.InGenericShape
A type substituting representation of a record component description.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.Explicit
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.RecordComponentDescription
RecordComponentDescription.AbstractBase, RecordComponentDescription.ForLoadedRecordComponent, RecordComponentDescription.InDefinedShape, RecordComponentDescription.InGenericShape, RecordComponentDescription.Latent, RecordComponentDescription.Token, RecordComponentDescription.TypeSubstituting
-
-
Field Summary
Fields Modifier and Type Field Description private TypeDescription.Generic
declaringType
The type that declares this type-substituted record component.private RecordComponentDescription
recordComponentDescription
The represented record component.private TypeDescription.Generic.Visitor<? extends TypeDescription.Generic>
visitor
A visitor that is applied to the parameter type.-
Fields inherited from interface net.bytebuddy.description.NamedElement
EMPTY_NAME, NO_NAME
-
Fields inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
NON_GENERIC_SIGNATURE
-
-
Constructor Summary
Constructors Constructor Description TypeSubstituting(TypeDescription.Generic declaringType, RecordComponentDescription recordComponentDescription, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Creates a new type substituting representation of a record component description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordComponentDescription.InDefinedShape
asDefined()
Returns this type dependant in its defined shape, i.e.MethodDescription.InGenericShape
getAccessor()
Returns the accessor for this record component.java.lang.String
getActualName()
Returns the name of this element as it is found in the source code.AnnotationList
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.TypeDefinition
getDeclaringType()
Returns the declaring type of this instance.TypeDescription.Generic
getType()
Returns the type of the record.-
Methods inherited from class net.bytebuddy.description.type.RecordComponentDescription.AbstractBase
asToken, equals, getDescriptor, getGenericSignature, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
getDescriptor, getGenericSignature
-
Methods inherited from interface net.bytebuddy.description.type.RecordComponentDescription
asToken
-
-
-
-
Field Detail
-
declaringType
private final TypeDescription.Generic declaringType
The type that declares this type-substituted record component.
-
recordComponentDescription
private final RecordComponentDescription recordComponentDescription
The represented record component.
-
visitor
private final TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor
A visitor that is applied to the parameter type.
-
-
Constructor Detail
-
TypeSubstituting
public TypeSubstituting(TypeDescription.Generic declaringType, RecordComponentDescription recordComponentDescription, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Creates a new type substituting representation of a record component description.- Parameters:
declaringType
- The type that declares this type-substituted record component.recordComponentDescription
- The represented record component.visitor
- A visitor that is applied to the parameter type.
-
-
Method Detail
-
getAccessor
public MethodDescription.InGenericShape getAccessor()
Returns the accessor for this record component.- Specified by:
getAccessor
in interfaceRecordComponentDescription
- Specified by:
getAccessor
in interfaceRecordComponentDescription.InGenericShape
- Returns:
- The accessor for this record component.
-
getType
public TypeDescription.Generic getType()
Returns the type of the record.- Specified by:
getType
in interfaceRecordComponentDescription
- Returns:
- The type of the record.
-
asDefined
public RecordComponentDescription.InDefinedShape asDefined()
Returns this type dependant in its defined shape, i.e. the form it is declared in and without its type variable's resolved.- Specified by:
asDefined
in interfaceByteCodeElement.TypeDependant<RecordComponentDescription.InDefinedShape,RecordComponentDescription.Token>
- Returns:
- This type dependant in its defined shape.
-
getDeclaringType
public TypeDefinition getDeclaringType()
Returns the declaring type of this instance.- Specified by:
getDeclaringType
in interfaceDeclaredByType
- Returns:
- The declaring type or
null
if no such type exists.
-
getActualName
public java.lang.String getActualName()
Returns the name of this element as it is found in the source code. If no such name exists, an empty string is returned.- Specified by:
getActualName
in interfaceNamedElement
- Returns:
- The name of this element as given in a Java program's source code.
-
getDeclaredAnnotations
public AnnotationList getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.- Specified by:
getDeclaredAnnotations
in interfaceAnnotationSource
- Returns:
- A list of declared annotations.
-
-