Class RecordComponentDescription.ForLoadedRecordComponent
java.lang.Object
net.bytebuddy.description.type.RecordComponentDescription.AbstractBase
net.bytebuddy.description.type.RecordComponentDescription.InDefinedShape.AbstractBase
net.bytebuddy.description.type.RecordComponentDescription.ForLoadedRecordComponent
- All Implemented Interfaces:
AnnotationSource, ByteCodeElement.TypeDependant<RecordComponentDescription.InDefinedShape, RecordComponentDescription.Token>, DeclaredByType, DeclaredByType.WithMandatoryDeclaration, NamedElement, NamedElement.WithDescriptor, RecordComponentDescription, RecordComponentDescription.InDefinedShape
- Enclosing interface:
RecordComponentDescription
public static class RecordComponentDescription.ForLoadedRecordComponent
extends RecordComponentDescription.InDefinedShape.AbstractBase
Represents a loaded record component.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceA dispatcher for accessing methods ofjava.lang.reflect.RecordComponent.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.TypeSubstitutingNested classes/interfaces inherited from interface RecordComponentDescription.InDefinedShape
RecordComponentDescription.InDefinedShape.AbstractBase -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final RecordComponentDescription.ForLoadedRecordComponent.RecordComponentA dispatcher for accessingjava.lang.RecordComponenttypes.private final AnnotatedElementThe represented record component.Fields inherited from interface NamedElement
EMPTY_NAME, NO_NAMEFields inherited from interface NamedElement.WithDescriptor
NON_GENERIC_SIGNATURE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForLoadedRecordComponent(AnnotatedElement recordComponent) Creates a new representation of a loaded record component. -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> TdoPrivileged(PrivilegedAction<T> action) A proxy forjava.security.AccessController#doPrivilegedthat is activated if available.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.Returns the generic signature of this byte code element.getType()Returns the type of the record.static RecordComponentDescriptionResolves an instance into a record component description.Methods inherited from class RecordComponentDescription.InDefinedShape.AbstractBase
asDefinedMethods inherited from class RecordComponentDescription.AbstractBase
asToken, equals, getDescriptor, hashCode, toStringMethods inherited from interface NamedElement.WithDescriptor
getDescriptorMethods inherited from interface RecordComponentDescription
asToken
-
Field Details
-
RECORD_COMPONENT
protected static final RecordComponentDescription.ForLoadedRecordComponent.RecordComponent RECORD_COMPONENTA dispatcher for accessingjava.lang.RecordComponenttypes. -
recordComponent
The represented record component.
-
-
Constructor Details
-
ForLoadedRecordComponent
Creates a new representation of a loaded record component.- Parameters:
recordComponent- The represented record component.
-
-
Method Details
-
doPrivileged
A proxy forjava.security.AccessController#doPrivilegedthat is activated if available.- Type Parameters:
T- The type of the action's resolved value.- Parameters:
action- The action to execute from a privileged context.- Returns:
- The action's resolved value.
-
of
Resolves an instance into a record component description.- Parameters:
recordComponent- The record component to represent.- Returns:
- A suitable description of the record component.
-
getType
Returns the type of the record.- Returns:
- The type of the record.
-
getAccessor
Description copied from class:RecordComponentDescription.InDefinedShape.AbstractBaseReturns the accessor for this record component.- Specified by:
getAccessorin interfaceRecordComponentDescription- Specified by:
getAccessorin interfaceRecordComponentDescription.InDefinedShape- Overrides:
getAccessorin classRecordComponentDescription.InDefinedShape.AbstractBase- Returns:
- The accessor for this record component.
-
getDeclaringType
Returns the declaring type of this instance.- 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.- Returns:
- The name of this element as given in a Java program's source code.
-
getGenericSignature
Description copied from class:RecordComponentDescription.AbstractBaseReturns the generic signature of this byte code element. If this element does not reference generic types or references malformed generic types,nullis returned as a signature.- Specified by:
getGenericSignaturein interfaceNamedElement.WithDescriptor- Overrides:
getGenericSignaturein classRecordComponentDescription.AbstractBase- Returns:
- The generic signature or
nullif this element is not generic.
-
getDeclaredAnnotations
Returns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-