Class Transformer.ForField.TransformedField

All Implemented Interfaces:
AnnotationSource, ByteCodeElement, ByteCodeElement.TypeDependant<FieldDescription.InDefinedShape,FieldDescription.Token>, DeclaredByType, DeclaredByType.WithMandatoryDeclaration, 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.
  • Field Details

    • 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 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

      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

      @Nonnull 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 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.