Package net.bytebuddy.dynamic
Class Transformer.ForField.TransformedField
- java.lang.Object
-
- net.bytebuddy.description.ModifierReviewable.AbstractBase
-
- net.bytebuddy.description.field.FieldDescription.AbstractBase
-
- net.bytebuddy.dynamic.Transformer.ForField.TransformedField
-
- All Implemented Interfaces:
AnnotationSource
,ByteCodeElement
,ByteCodeElement.TypeDependant<FieldDescription.InDefinedShape,FieldDescription.Token>
,DeclaredByType
,FieldDescription
,ModifierReviewable
,ModifierReviewable.ForFieldDescription
,ModifierReviewable.ForMethodDescription
,ModifierReviewable.ForParameterDescription
,ModifierReviewable.ForTypeDefinition
,ModifierReviewable.OfAbstraction
,ModifierReviewable.OfByteCodeElement
,ModifierReviewable.OfEnumeration
,NamedElement
,NamedElement.WithDescriptor
,NamedElement.WithGenericName
,NamedElement.WithRuntimeName
- Enclosing class:
- Transformer.ForField
protected static class Transformer.ForField.TransformedField extends FieldDescription.AbstractBase
An implementation of a transformed field.
-
-
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.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
-
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.ModifierReviewable
ModifierReviewable.AbstractBase, 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
Fields Modifier and Type Field Description private TypeDefinition
declaringType
The field's declaring type.private FieldDescription.InDefinedShape
fieldDescription
The field's defined shape.private TypeDescription
instrumentedType
The instrumented type for which this field is transformed.private FieldDescription.Token
token
A field token representing the transformed field.-
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 protected
TransformedField(TypeDescription instrumentedType, TypeDefinition declaringType, FieldDescription.Token token, FieldDescription.InDefinedShape fieldDescription)
Creates a new transformed field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldDescription.InDefinedShape
asDefined()
Returns this type dependant in its defined shape, i.e.AnnotationList
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.TypeDefinition
getDeclaringType()
Returns the declaring type of this instance.int
getModifiers()
Returns the modifier that is described by this object.java.lang.String
getName()
Returns the internalName of this byte code element.TypeDescription.Generic
getType()
Returns the type of the described field.-
Methods inherited from class net.bytebuddy.description.field.FieldDescription.AbstractBase
asSignatureToken, asToken, equals, getActualModifiers, getActualName, getDescriptor, getGenericSignature, getInternalName, hashCode, isAccessibleTo, isVisibleTo, toGenericString, toString
-
Methods inherited from class net.bytebuddy.description.ModifierReviewable.AbstractBase
getEnumerationState, getFieldManifestation, getFieldPersistence, getMethodManifestation, getMethodStrictness, getOwnership, getParameterManifestation, getProvisioningState, getSynchronizationState, getSyntheticState, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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
-
-
-
-
Field Detail
-
instrumentedType
private final TypeDescription instrumentedType
The instrumented type for which this field is transformed.
-
declaringType
private final TypeDefinition declaringType
The field's declaring type.
-
token
private final FieldDescription.Token token
A field token representing the transformed field.
-
fieldDescription
private final FieldDescription.InDefinedShape fieldDescription
The field's defined shape.
-
-
Constructor Detail
-
TransformedField
protected TransformedField(TypeDescription instrumentedType, TypeDefinition declaringType, FieldDescription.Token token, FieldDescription.InDefinedShape fieldDescription)
Creates a new transformed field.- Parameters:
instrumentedType
- The instrumented type for which this field is transformed.declaringType
- The field's declaring type.token
- A field token representing the transformed field.fieldDescription
- The field's defined shape.
-
-
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.
-
getDeclaringType
public TypeDefinition getDeclaringType()
Returns the declaring type of this instance.- Returns:
- The declaring type or
null
if 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.
-
asDefined
public FieldDescription.InDefinedShape asDefined()
Returns this type dependant in its defined shape, i.e. the form it is declared in and without its type variable's resolved.- Returns:
- This type dependant in its defined shape.
-
getName
public java.lang.String getName()
Returns the internalName of this byte code element.- Returns:
- The internalName of this byte code element as visible from within a running Java application.
-
-