Interface KlumFactory.BuilderFactoryProvider<T,B extends KlumBuilder<T>>

Type Parameters:
T - the selected DSL Object type
B - the selected public Builder type
Enclosing class:
KlumFactory<T>

public static interface KlumFactory.BuilderFactoryProvider<T,B extends KlumBuilder<T>>
Public factory capability used by generated polymorphic relationship methods.

Passing a generated Foo.Create to such a method selects Foo while the method creates and attaches the child through this factory's AsBuilder() operation in the owning Construction session. It never starts a root factory lifecycle.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the active-session Builder factory for the selected DSL Object type.
    Returns the selected DSL Object type.
  • Method Details

    • getModelType

      Class<T> getModelType()
      Returns the selected DSL Object type.

      This second capability also keeps the provider distinct from a Groovy SAM, so an ordinary configuration closure cannot be coerced into polymorphic factory selection.

    • AsBuilder

      Returns the active-session Builder factory for the selected DSL Object type.