Class KlumFactory.Unkeyed<T>

java.lang.Object
com.blackbuild.klum.ast.runtime.KlumFactory<T>
com.blackbuild.klum.ast.runtime.KlumFactory.Unkeyed<T>
Type Parameters:
T - The type of the model.
Enclosing class:
KlumFactory<T>

public abstract static class KlumFactory.Unkeyed<T> extends KlumFactory<T>
Factory for unkeyed models.
  • Constructor Details

    • Unkeyed

      protected Unkeyed(Class<T> type)
  • Method Details

    • AsBuilder

      Description copied from class: KlumFactory
      Returns the active-session factory used to create owned child Builders.
      Overrides:
      AsBuilder in class KlumFactory<T>
    • With

      @Deprecated(forRemoval=true) public T With()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use One() instead.
      Convenience methods to allow simply replacing 'X.create' with 'X.Create.With' in scripts, without checking for arguments. This means that empty create calls like 'X.create()' will correctly work afterward.
    • One

      public T One()
      Creates a new instance of the model applying any configuration (apart from 'postCreate' and 'postApply' methods and any active templates).
      Returns:
      The instantiated object.
    • With

      public T With(Map<String,?> configMap, groovy.lang.Closure<?> configuration)
      Creates a new instance of the model applying the given configuration map and closure.
      Parameters:
      configMap - The configuration map to apply to the model.
      configuration - The configuration closure to apply to the model.
      Returns:
      The instantiated object.
    • With

      public T With(groovy.lang.Closure<?> configuration)
      Creates a new instance of the model applying the given configuration closure.
      Parameters:
      configuration - The configuration closure to apply to the model.
      Returns:
      The instantiated object.
    • With

      public T With(Map<String,?> configMap)
      Creates a new instance of the model applying the given configuration map.
      Parameters:
      configMap - The configuration map to apply to the model.
      Returns:
      The instantiated object.
    • From

      public T From(String configuration)
      Creates a new instance of the model and then applying the given text as configuration.
      Parameters:
      configuration - the configuration text to apply to the model.
      Returns:
      The instantiated object.
    • From

      public T From(String configuration, ClassLoader loader)
      Creates a new instance of the model and then applying the given text as configuration.
      Parameters:
      configuration - the configuration text to apply to the model.
      loader - The classloader used to compile the configuration text.
      Returns:
      The instantiated object.