Package net.bytebuddy.pool
Class TypePool.Default.LazyTypeDescription.LazyFieldDescription
- java.lang.Object
-
- net.bytebuddy.description.ModifierReviewable.AbstractBase
-
- net.bytebuddy.description.field.FieldDescription.AbstractBase
-
- net.bytebuddy.description.field.FieldDescription.InDefinedShape.AbstractBase
-
- net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.LazyFieldDescription
-
- All Implemented Interfaces:
AnnotationSource,ByteCodeElement,ByteCodeElement.Member,ByteCodeElement.TypeDependant<FieldDescription.InDefinedShape,FieldDescription.Token>,DeclaredByType,DeclaredByType.WithMandatoryDeclaration,FieldDescription,FieldDescription.InDefinedShape,ModifierReviewable,ModifierReviewable.ForFieldDescription,ModifierReviewable.ForMethodDescription,ModifierReviewable.ForModuleDescription,ModifierReviewable.ForModuleRequirement,ModifierReviewable.ForParameterDescription,ModifierReviewable.ForTypeDefinition,ModifierReviewable.OfAbstraction,ModifierReviewable.OfByteCodeElement,ModifierReviewable.OfEnumeration,ModifierReviewable.OfMandatable,NamedElement,NamedElement.WithDescriptor,NamedElement.WithGenericName,NamedElement.WithRuntimeName
- Enclosing class:
- TypePool.Default.LazyTypeDescription
private class TypePool.Default.LazyTypeDescription.LazyFieldDescription extends FieldDescription.InDefinedShape.AbstractBase
A lazy field description that only resolved type references when required.
-
-
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.ByteCodeElement
ByteCodeElement.Member, ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.DeclaredByType
DeclaredByType.WithMandatoryDeclaration
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.field.FieldDescription
FieldDescription.AbstractBase, FieldDescription.ForLoadedField, FieldDescription.InDefinedShape, FieldDescription.InGenericShape, FieldDescription.Latent, FieldDescription.SignatureToken, FieldDescription.Token, FieldDescription.TypeSubstituting
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.field.FieldDescription.InDefinedShape
FieldDescription.InDefinedShape.AbstractBase
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForModuleDescription, ModifierReviewable.ForModuleRequirement, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, ModifierReviewable.OfMandatable
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>annotationTokensA list of annotation descriptions of this field.private java.lang.StringdescriptorThe descriptor of this field's type.private java.lang.StringgenericSignatureThe field's generic signature as found in the class file ornullif the field is not generic.private intmodifiersThe modifiers of the field.private java.lang.StringnameThe name of the field.private TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForFieldsignatureResolutionA resolution of this field's generic type.private java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>typeAnnotationTokensA mapping of the field type's type annotation tokens.-
Fields inherited from interface net.bytebuddy.description.field.FieldDescription
NO_DEFAULT_VALUE
-
Fields inherited from interface net.bytebuddy.description.ModifierReviewable
EMPTY_MASK
-
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 privateLazyFieldDescription(java.lang.String name, int modifiers, java.lang.String descriptor, java.lang.String genericSignature, TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForField 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 field description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.intgetModifiers()Returns the modifier that is described by this object.java.lang.StringgetName()Returns the binary name of this byte code element.TypeDescription.GenericgetType()Returns the type of the described field.-
Methods inherited from class net.bytebuddy.description.field.FieldDescription.InDefinedShape.AbstractBase
asDefined
-
Methods inherited from class net.bytebuddy.description.field.FieldDescription.AbstractBase
asSignatureToken, asToken, equals, getActualModifiers, getActualName, getDescriptor, getInternalName, hashCode, isAccessibleTo, isVisibleTo, toGenericString, toString
-
Methods inherited from class net.bytebuddy.description.ModifierReviewable.AbstractBase
getEnumerationState, getFieldManifestation, getFieldPersistence, getMandate, getMethodManifestation, getMethodStrictness, getOpenness, getOwnership, getParameterManifestation, getProvisioningState, getRequiredPhase, getSynchronizationState, getSyntheticState, getTransitivity, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isOpen, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStaticPhase, isStrict, isSynchronized, isSynthetic, isTransient, isTransitive, isVarArgs, isVolatile
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.description.ByteCodeElement
isAccessibleTo, isVisibleTo
-
Methods inherited from interface net.bytebuddy.description.ByteCodeElement.TypeDependant
asToken
-
Methods inherited from interface net.bytebuddy.description.field.FieldDescription
asSignatureToken, getActualModifiers
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getSyntheticState, isFinal, isSynthetic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.ForFieldDescription
getFieldManifestation, getFieldPersistence, isTransient, isVolatile
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfEnumeration
getEnumerationState, isEnum
-
Methods inherited from interface net.bytebuddy.description.NamedElement
getActualName
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
getDescriptor
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithGenericName
toGenericString
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithRuntimeName
getInternalName
-
-
-
-
Field Detail
-
name
private final java.lang.String name
The name of the field.
-
modifiers
private final int modifiers
The modifiers of the field.
-
descriptor
private final java.lang.String descriptor
The descriptor of this field's type.
-
genericSignature
@MaybeNull private final java.lang.String genericSignature
The field's generic signature as found in the class file ornullif the field is not generic.
-
signatureResolution
private final TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForField signatureResolution
A resolution of this field's generic type.
-
typeAnnotationTokens
private final java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> typeAnnotationTokens
A mapping of the field type's type annotation tokens.
-
annotationTokens
private final java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens
A list of annotation descriptions of this field.
-
-
Constructor Detail
-
LazyFieldDescription
private LazyFieldDescription(java.lang.String name, int modifiers, java.lang.String descriptor, @MaybeNull java.lang.String genericSignature, TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForField 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 field description.- Parameters:
name- The name of the field.modifiers- The modifiers of the field.descriptor- The descriptor of this field's type.genericSignature- The field's generic signature as found in the class file ornullif the field is not generic.signatureResolution- A resolution of this field's generic type.typeAnnotationTokens- A mapping of the field type's type annotation tokens.annotationTokens- A list of annotation descriptions of this field.
-
-
Method Detail
-
getType
public TypeDescription.Generic getType()
Returns the type of the described field.- Returns:
- The type of the described field.
-
getDeclaredAnnotations
public AnnotationList getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-
getName
public java.lang.String getName()
Returns the binary name of this byte code element. If no well-defined internal name is known for this element, the actual name is returned.- Returns:
- The binary ame of this byte code element as visible from within a running Java application.
-
getDeclaringType
@Nonnull public TypeDescription getDeclaringType()
Returns the declaring type of this instance.- Returns:
- The declaring type or
nullif no such type exists.
-
getModifiers
public int getModifiers()
Returns the modifier that is described by this object.- Returns:
- The modifier that is described by this object.
-
getGenericSignature
@MaybeNull public java.lang.String getGenericSignature()
Returns 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 classFieldDescription.AbstractBase- Returns:
- The generic signature or
nullif this element is not generic.
-
-