Package net.bytebuddy.pool
Class TypePool.Default.LazyTypeDescription.LazyRecordComponentDescription
- java.lang.Object
-
- net.bytebuddy.description.type.RecordComponentDescription.AbstractBase
-
- net.bytebuddy.description.type.RecordComponentDescription.InDefinedShape.AbstractBase
-
- net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.LazyRecordComponentDescription
-
- All Implemented Interfaces:
AnnotationSource
,ByteCodeElement.TypeDependant<RecordComponentDescription.InDefinedShape,RecordComponentDescription.Token>
,DeclaredByType
,NamedElement
,NamedElement.WithDescriptor
,RecordComponentDescription
,RecordComponentDescription.InDefinedShape
- Enclosing class:
- TypePool.Default.LazyTypeDescription
private class TypePool.Default.LazyTypeDescription.LazyRecordComponentDescription extends RecordComponentDescription.InDefinedShape.AbstractBase
A lazy description of a record component.
-
-
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
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.RecordComponentDescription.InDefinedShape
RecordComponentDescription.InDefinedShape.AbstractBase
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>
annotationTokens
A list of the record components annotations.private java.lang.String
descriptor
The record component's descriptor.private java.lang.String
genericSignature
The record component's generic signature ornull
if the record component is non-generic.private java.lang.String
name
The record component's name.private TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForRecordComponent
signatureResolution
The record component's signature resolution.private java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>
typeAnnotationTokens
A mapping of the record component's type annotations.-
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 private
LazyRecordComponentDescription(java.lang.String name, java.lang.String descriptor, java.lang.String genericSignature, TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForRecordComponent signatureResolution, java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> typeAnnotationTokens, java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens)
Creates a new lazy description of a record component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.TypeDescription
getDeclaringType()
Returns the declaring type of this instance.java.lang.String
getGenericSignature()
Returns the generic signature of this byte code element.TypeDescription.Generic
getType()
Returns the type of the record.-
Methods inherited from class net.bytebuddy.description.type.RecordComponentDescription.InDefinedShape.AbstractBase
asDefined, getAccessor
-
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
-
name
private final java.lang.String name
The record component's name.
-
descriptor
private final java.lang.String descriptor
The record component's descriptor.
-
genericSignature
private final java.lang.String genericSignature
The record component's generic signature ornull
if the record component is non-generic.
-
signatureResolution
private final TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForRecordComponent signatureResolution
The record component's signature resolution.
-
typeAnnotationTokens
private final java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> typeAnnotationTokens
A mapping of the record component's type annotations.
-
annotationTokens
private final java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens
A list of the record components annotations.
-
-
Constructor Detail
-
LazyRecordComponentDescription
private LazyRecordComponentDescription(java.lang.String name, java.lang.String descriptor, java.lang.String genericSignature, TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForRecordComponent signatureResolution, java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> typeAnnotationTokens, java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens)
Creates a new lazy description of a record component.- Parameters:
name
- The record component's name.descriptor
- The record component's descriptor.genericSignature
- The record component's generic signature ornull
if the record component is non-generic.signatureResolution
- The record component's signature resolution.typeAnnotationTokens
- A mapping of the record component's type annotations.annotationTokens
- A list of the record components annotations.
-
-
Method Detail
-
getType
public TypeDescription.Generic getType()
Returns the type of the record.- Returns:
- The type of the record.
-
getDeclaringType
public TypeDescription getDeclaringType()
Returns the declaring type of this instance.- 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.- 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.- Returns:
- A list of declared annotations.
-
getGenericSignature
public java.lang.String getGenericSignature()
Description copied from class:RecordComponentDescription.AbstractBase
Returns the generic signature of this byte code element. If this element does not reference generic types or references malformed generic types,null
is returned as a signature.- Specified by:
getGenericSignature
in interfaceNamedElement.WithDescriptor
- Overrides:
getGenericSignature
in classRecordComponentDescription.AbstractBase
- Returns:
- The generic signature or
null
if this element is not generic.
-
-