Package net.bytebuddy.description.field
Interface FieldDescription
- All Superinterfaces:
AnnotationSource
,ByteCodeElement
,ByteCodeElement.Member
,ByteCodeElement.TypeDependant<FieldDescription.InDefinedShape,
,FieldDescription.Token> DeclaredByType
,DeclaredByType.WithMandatoryDeclaration
,ModifierReviewable
,ModifierReviewable.ForFieldDescription
,ModifierReviewable.OfByteCodeElement
,ModifierReviewable.OfEnumeration
,NamedElement
,NamedElement.WithDescriptor
,NamedElement.WithGenericName
,NamedElement.WithRuntimeName
- All Known Subinterfaces:
FieldDescription.InDefinedShape
,FieldDescription.InGenericShape
- All Known Implementing Classes:
FieldDescription.AbstractBase
,FieldDescription.ForLoadedField
,FieldDescription.InDefinedShape.AbstractBase
,FieldDescription.Latent
,FieldDescription.TypeSubstituting
,Implementation.Context.Default.CacheValueField
,Transformer.ForField.TransformedField
,TypePool.Default.LazyTypeDescription.LazyFieldDescription
public interface FieldDescription
extends ModifierReviewable.ForFieldDescription, DeclaredByType.WithMandatoryDeclaration, ByteCodeElement.Member, ByteCodeElement.TypeDependant<FieldDescription.InDefinedShape,FieldDescription.Token>
Implementations of this interface describe a Java field. Implementations of this interface must provide meaningful
equal(Object)
and hashCode()
implementations.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
An abstract base implementation of a field description.static class
An implementation of a field description for a loaded field.static interface
Represents a field in its defined shape, i.e.static interface
Represents a field description in its generic shape, i.e.static class
A latent field description describes a field that is not attached to a declaringTypeDescription
.static class
A token that uniquely identifies a field by its name and type erasure.static class
A token representing a field's properties detached from a type.static class
A field description that represents a given field but with a substituted field type.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.ModifierReviewable
ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Object
A representative of a field's non-set 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
-
Method Summary
Modifier and TypeMethodDescriptionReturns a signature token representing this field.int
Returns the field's actual modifiers as it is present in a class file, i.e.Returns the declaring type of this instance.getType()
Returns the type of the described field.Methods inherited from interface net.bytebuddy.description.annotation.AnnotationSource
getDeclaredAnnotations
Methods inherited from interface net.bytebuddy.description.ByteCodeElement
isAccessibleTo, isVisibleTo
Methods inherited from interface net.bytebuddy.description.ByteCodeElement.TypeDependant
asDefined, asToken
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getModifiers, 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, getGenericSignature
Methods inherited from interface net.bytebuddy.description.NamedElement.WithGenericName
toGenericString
Methods inherited from interface net.bytebuddy.description.NamedElement.WithRuntimeName
getInternalName, getName
-
Field Details
-
NO_DEFAULT_VALUE
A representative of a field's non-set default value.
-
-
Method Details
-
getDeclaringType
Returns the declaring type of this instance.- Specified by:
getDeclaringType
in interfaceDeclaredByType
- Specified by:
getDeclaringType
in interfaceDeclaredByType.WithMandatoryDeclaration
- Returns:
- The declaring type or
null
if no such type exists.
-
getType
TypeDescription.Generic getType()Returns the type of the described field.- Returns:
- The type of the described field.
-
getActualModifiers
int getActualModifiers()Returns the field's actual modifiers as it is present in a class file, i.e. its modifiers including a flag if this field is deprecated.- Returns:
- The field's actual modifiers.
-
asSignatureToken
FieldDescription.SignatureToken asSignatureToken()Returns a signature token representing this field.- Returns:
- A signature token representing this field.
-