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, DeclaredByType.WithMandatoryDeclaration, 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 AnnotationSource
AnnotationSource.Empty, AnnotationSource.ExplicitNested classes/interfaces inherited from interface DeclaredByType
DeclaredByType.WithMandatoryDeclarationNested classes/interfaces inherited from interface NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeNameNested classes/interfaces inherited from interface RecordComponentDescription
RecordComponentDescription.AbstractBase, RecordComponentDescription.ForLoadedRecordComponent, RecordComponentDescription.InDefinedShape, RecordComponentDescription.InGenericShape, RecordComponentDescription.Latent, RecordComponentDescription.Token, RecordComponentDescription.TypeSubstituting -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDescription.GenericThe type that declares this type-substituted record component.private final RecordComponentDescriptionThe represented record component.private final TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> A visitor that is applied to the parameter type.Fields inherited from interface NamedElement
EMPTY_NAME, NO_NAMEFields inherited from interface NamedElement.WithDescriptor
NON_GENERIC_SIGNATURE -
Constructor Summary
ConstructorsConstructorDescriptionTypeSubstituting(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
Modifier and TypeMethodDescriptionReturns this type dependant in its defined shape, i.e.Returns the accessor for this record component.Returns the display name of this element as it is found in the source code.Returns a list of annotations that are declared by this instance.Returns the declaring type of this instance.getType()Returns the type of the record.Methods inherited from class RecordComponentDescription.AbstractBase
asToken, equals, getDescriptor, getGenericSignature, hashCode, toStringMethods inherited from interface NamedElement.WithDescriptor
getDescriptor, getGenericSignatureMethods inherited from interface RecordComponentDescription
asToken
-
Field Details
-
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.
-
-
Constructor Details
-
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 Details
-
getAccessor
Returns the accessor for this record component.- Specified by:
getAccessorin interfaceRecordComponentDescription- Specified by:
getAccessorin interfaceRecordComponentDescription.InGenericShape- Returns:
- The accessor for this record component.
-
getType
Returns the type of the record.- Specified by:
getTypein interfaceRecordComponentDescription- Returns:
- The type of the record.
-
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:
asDefinedin interfaceByteCodeElement.TypeDependant<RecordComponentDescription.InDefinedShape, RecordComponentDescription.Token>- Returns:
- This type dependant in its defined shape.
-
getDeclaringType
Returns the declaring type of this instance.- Specified by:
getDeclaringTypein interfaceDeclaredByType- Specified by:
getDeclaringTypein interfaceDeclaredByType.WithMandatoryDeclaration- Returns:
- The declaring type or
nullif no such type exists.
-
getActualName
Returns the display name of this element as it is found in the source code. If no such name exists, an empty string is returned.- Specified by:
getActualNamein interfaceNamedElement- Returns:
- The name of this element as given in a Java program's source code.
-
getDeclaredAnnotations
Returns a list of annotations that are declared by this instance.- Specified by:
getDeclaredAnnotationsin interfaceAnnotationSource- Returns:
- A list of declared annotations.
-