Interface TypeWriter.FieldPool.Record

All Known Implementing Classes:
TypeWriter.FieldPool.Record.ForExplicitField, TypeWriter.FieldPool.Record.ForImplicitField
Enclosing interface:
TypeWriter.FieldPool

public static interface TypeWriter.FieldPool.Record
An entry of a field pool that describes how a field is implemented.
See Also:
  • Method Details

    • isImplicit

      boolean isImplicit()
      Determines if this record is implicit, i.e is not defined by a TypeWriter.FieldPool.
      Returns:
      true if this record is implicit.
    • getField

      FieldDescription getField()
      Returns the field that this record represents.
      Returns:
      The field that this record represents.
    • getFieldAppender

      FieldAttributeAppender getFieldAppender()
      Returns the field attribute appender for a given field.
      Returns:
      The attribute appender to be applied on the given field.
    • resolveDefault

      @MaybeNull Object resolveDefault(@MaybeNull Object defaultValue)
      Resolves the default value that this record represents. This is not possible for implicit records.
      Parameters:
      defaultValue - The default value that was defined previously or null if no default value is defined.
      Returns:
      The default value for the represented field or null if no default value is to be defined.
    • apply

      void apply(org.objectweb.asm.ClassVisitor classVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)
      Writes this entry to a given class visitor.
      Parameters:
      classVisitor - The class visitor to which this entry is to be written to.
      annotationValueFilterFactory - The annotation value filter factory to apply when writing annotations.
    • apply

      void apply(org.objectweb.asm.FieldVisitor fieldVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)
      Applies this record to a field visitor. This is not possible for implicit records.
      Parameters:
      fieldVisitor - The field visitor onto which this record is to be applied.
      annotationValueFilterFactory - The annotation value filter factory to use for annotations.