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.Member, ByteCodeElement.TypeDependant<FieldDescription.InDefinedShape, FieldDescription.Token>, DeclaredByType, DeclaredByType.WithMandatoryDeclaration, FieldDescription, 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:
Transformer.ForField
An implementation of a transformed field.
-
Nested Class Summary
Nested classes/interfaces inherited from interface AnnotationSource
AnnotationSource.Empty, AnnotationSource.ExplicitNested classes/interfaces inherited from interface ByteCodeElement
ByteCodeElement.Member, ByteCodeElement.TypeDependant<T,S> Nested classes/interfaces inherited from interface DeclaredByType
DeclaredByType.WithMandatoryDeclarationNested classes/interfaces inherited from interface FieldDescription
FieldDescription.AbstractBase, FieldDescription.ForLoadedField, FieldDescription.InDefinedShape, FieldDescription.InGenericShape, FieldDescription.Latent, FieldDescription.SignatureToken, FieldDescription.Token, FieldDescription.TypeSubstitutingNested classes/interfaces inherited from interface ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForModuleDescription, ModifierReviewable.ForModuleRequirement, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, ModifierReviewable.OfMandatableNested classes/interfaces inherited from interface NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDefinitionThe field's declaring type.private final FieldDescription.InDefinedShapeThe field's defined shape.private final TypeDescriptionThe instrumented type for which this field is transformed.private final FieldDescription.TokenA field token representing the transformed field.Fields inherited from interface FieldDescription
NO_DEFAULT_VALUEFields inherited from interface ModifierReviewable
EMPTY_MASKFields inherited from interface NamedElement
EMPTY_NAME, NO_NAMEFields inherited from interface NamedElement.WithDescriptor
NON_GENERIC_SIGNATURE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTransformedField(TypeDescription instrumentedType, TypeDefinition declaringType, FieldDescription.Token token, FieldDescription.InDefinedShape fieldDescription) Creates a new transformed field. -
Method Summary
Modifier and TypeMethodDescriptionReturns this type dependant in its defined shape, i.e.Returns a list of annotations that are declared by this instance.Returns the declaring type of this instance.intReturns the modifier that is described by this object.getName()Returns the binary name of this byte code element.getType()Returns the type of the described field.Methods inherited from class FieldDescription.AbstractBase
asSignatureToken, asToken, equals, getActualModifiers, getActualName, getDescriptor, getGenericSignature, getInternalName, hashCode, isAccessibleTo, isVisibleTo, toGenericString, toStringMethods inherited from class 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, isVolatileMethods inherited from interface ModifierReviewable
getSyntheticState, isFinal, isSyntheticMethods inherited from interface ModifierReviewable.ForFieldDescription
getFieldManifestation, getFieldPersistence, isTransient, isVolatileMethods inherited from interface ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStaticMethods inherited from interface ModifierReviewable.OfEnumeration
getEnumerationState, isEnum
-
Field Details
-
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.
-
-
Constructor Details
-
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 Details
-
getType
Returns the type of the described field.- Returns:
- The type of the described field.
-
getDeclaredAnnotations
Returns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-
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.
-
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
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.
-