Interface Prototype.OptionDecorator<B,T>

Type Parameters:
B - the type of the builder to decorate
T - the type of the option to decorate
Enclosing class:
Prototype
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Prototype.OptionDecorator<B,T>
Provides a way to decorate a single option when it is applied to the builder. The decorator must have an accessible no argument constructor (at least package local).
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    decorate(B builder, T optionValue)
    Provides the ability to decorate option as it is being set on the target builder.
  • Method Details

    • decorate

      void decorate(B builder, T optionValue)
      Provides the ability to decorate option as it is being set on the target builder. This method is invoked from within the setter of the value before the value is set on the builder (i.e. the builder still contains previous value). Do not call the same setter again from within this method, as it would end in a stack overflow.
      Parameters:
      builder - the target builder being decorated
      optionValue - option value set by the caller of the setter method