Class FieldDescription.Latent

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.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, NamedElement, NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithRuntimeName
Enclosing interface:
FieldDescription

public static class FieldDescription.Latent extends FieldDescription.InDefinedShape.AbstractBase
A latent field description describes a field that is not attached to a declaring TypeDescription.
  • Field Details

    • declaringType

      private final TypeDescription declaringType
      The type for which this field is defined.
    • name

      private final String name
      The name of the field.
    • modifiers

      private final int modifiers
      The field's modifiers.
    • fieldType

      private final TypeDescription.Generic fieldType
      The type of the field.
    • declaredAnnotations

      private final List<? extends AnnotationDescription> declaredAnnotations
      The annotations of this field.
  • Constructor Details

    • Latent

      public Latent(TypeDescription declaringType, FieldDescription.Token token)
      Creates a new latent field description. All provided types are attached to this instance before they are returned.
      Parameters:
      declaringType - The declaring type of the field.
      token - A token representing the field's shape.
    • Latent

      public Latent(TypeDescription declaringType, String name, int modifiers, TypeDescription.Generic fieldType, List<? extends AnnotationDescription> declaredAnnotations)
      Creates a new latent field description. All provided types are attached to this instance before they are returned.
      Parameters:
      declaringType - The declaring type of the field.
      name - The name of the field.
      modifiers - The type of the field.
      fieldType - The field's modifiers.
      declaredAnnotations - The annotations of this field.
  • 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.
    • 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.
    • getDeclaringType

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