Package net.bytebuddy.description.type
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 Classes Modifier and Type Class Description protected static interfaceRecordComponentDescription.ForLoadedRecordComponent.RecordComponentA dispatcher for accessing methods ofjava.lang.reflect.RecordComponent.-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.Explicit
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.DeclaredByType
DeclaredByType.WithMandatoryDeclaration
-
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
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.RecordComponentDescription.InDefinedShape
RecordComponentDescription.InDefinedShape.AbstractBase
-
-
Field Summary
Fields Modifier and Type Field Description protected static RecordComponentDescription.ForLoadedRecordComponent.RecordComponentRECORD_COMPONENTA dispatcher for accessingjava.lang.RecordComponenttypes.private java.lang.reflect.AnnotatedElementrecordComponentThe represented record component.-
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 Modifier Constructor Description protectedForLoadedRecordComponent(java.lang.reflect.AnnotatedElement recordComponent)Creates a new representation of a loaded record component.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T> TdoPrivileged(java.security.PrivilegedAction<T> action)A proxy forjava.security.AccessController#doPrivilegedthat is activated if available.MethodDescription.InDefinedShapegetAccessor()Returns the accessor for this record component.java.lang.StringgetActualName()Returns the display name of this element as it is found in the source code.AnnotationListgetDeclaredAnnotations()Returns a list of annotations that are declared by this instance.TypeDescriptiongetDeclaringType()Returns the declaring type of this instance.java.lang.StringgetGenericSignature()Returns the generic signature of this byte code element.TypeDescription.GenericgetType()Returns the type of the record.static RecordComponentDescriptionof(java.lang.Object recordComponent)Resolves an instance into a record component description.-
Methods inherited from class net.bytebuddy.description.type.RecordComponentDescription.InDefinedShape.AbstractBase
asDefined
-
Methods inherited from class net.bytebuddy.description.type.RecordComponentDescription.AbstractBase
asToken, equals, getDescriptor, 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
-
Methods inherited from interface net.bytebuddy.description.type.RecordComponentDescription
asToken
-
-
-
-
Field Detail
-
RECORD_COMPONENT
protected static final RecordComponentDescription.ForLoadedRecordComponent.RecordComponent RECORD_COMPONENT
A dispatcher for accessingjava.lang.RecordComponenttypes.
-
recordComponent
private final java.lang.reflect.AnnotatedElement recordComponent
The represented record component.
-
-
Method Detail
-
doPrivileged
@Enhance private static <T> T doPrivileged(java.security.PrivilegedAction<T> action)
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
public static RecordComponentDescription of(java.lang.Object recordComponent)
Resolves an instance into a record component description.- Parameters:
recordComponent- The record component to represent.- Returns:
- A suitable description of the record component.
-
getType
public TypeDescription.Generic getType()
Returns the type of the record.- Returns:
- The type of the record.
-
getAccessor
public MethodDescription.InDefinedShape 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
@Nonnull public TypeDescription getDeclaringType()
Returns the declaring type of this instance.- Returns:
- The declaring type or
nullif no such type exists.
-
getActualName
public java.lang.String 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
@MaybeNull public java.lang.String 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
public AnnotationList getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-
-