Class FieldRegistry.Default.Entry

java.lang.Object
net.bytebuddy.dynamic.scaffold.FieldRegistry.Default.Entry
All Implemented Interfaces:
LatentMatcher<FieldDescription>
Enclosing class:
FieldRegistry.Default

@Enhance protected static class FieldRegistry.Default.Entry extends Object implements LatentMatcher<FieldDescription>
An entry of the default field registry.
  • Field Details

  • Constructor Details

    • Entry

      protected Entry(LatentMatcher<? super FieldDescription> matcher, FieldAttributeAppender.Factory fieldAttributeAppenderFactory, @MaybeNull Object defaultValue, Transformer<FieldDescription> transformer)
      Creates a new entry.
      Parameters:
      matcher - The matcher to identify any field that this definition concerns.
      fieldAttributeAppenderFactory - The field attribute appender factory to apply on any matched field.
      defaultValue - The default value to write to the field or null if no default value is to be set for the field.
      transformer - The field transformer to apply to any matched field.
  • Method Details

    • getFieldAttributeAppenderFactory

      protected FieldAttributeAppender.Factory getFieldAttributeAppenderFactory()
      Returns the field attribute appender factory to apply on any matched field.
      Returns:
      The field attribute appender factory to apply on any matched field.
    • getDefaultValue

      @MaybeNull protected Object getDefaultValue()
      Returns the default value to write to the field or null if no default value is to be set for the field.
      Returns:
      The default value to write to the field or null if no default value is to be set for the field.
    • getTransformer

      protected Transformer<FieldDescription> getTransformer()
      Returns the field transformer to apply to any matched field.
      Returns:
      The field transformer to apply to any matched field.
    • resolve

      public ElementMatcher<? super FieldDescription> resolve(TypeDescription typeDescription)
      Resolves the element matcher this instance represents for the supplied type description.
      Specified by:
      resolve in interface LatentMatcher<FieldDescription>
      Parameters:
      typeDescription - The type description for which the represented matcher should be resolved.
      Returns:
      An ElementMatcher that represents this matcher's resolved form.