Package com.blackbuild.klum.ast.runtime
Class KlumFactory.Keyed<T>
java.lang.Object
com.blackbuild.klum.ast.runtime.KlumFactory<T>
com.blackbuild.klum.ast.runtime.KlumFactory.Keyed<T>
- Type Parameters:
T- The type of the model.
- Enclosing class:
- KlumFactory<T>
Factory for keyed models.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.blackbuild.klum.ast.runtime.KlumFactory
KlumFactory.BuilderFactory<T,B extends KlumBuilder<T>>, KlumFactory.BuilderFactoryProvider<T, B extends KlumBuilder<T>>, KlumFactory.Keyed<T>, KlumFactory.KeyedBuilderFactory<T, B extends KlumBuilder<T>>, KlumFactory.Unkeyed<T>, KlumFactory.UnkeyedBuilderFactory<T, B extends KlumBuilder<T>> -
Field Summary
Fields inherited from class com.blackbuild.klum.ast.runtime.KlumFactory
type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the active-session factory used to create owned child Builders.Creates a new instance of the model with the given key and then applying the given text as configuration.From(String key, String configuration, ClassLoader loader) Creates a new instance of the model with the given key and then applying the given text as configuration.Creates a new instance of the model by only setting the key, but not applying any configuration (apart from 'postCreate' and 'postApply' methods).Deprecated, for removal: This API element is subject to removal in a future version.Creates a new instance of the model with the given key and applying the given configuration closure.Creates a new instance of the model with the given key and applying the given configuration map.Creates a new instance of the model with the given key and applying the given configuration map and closure.Methods inherited from class com.blackbuild.klum.ast.runtime.KlumFactory
From, From, From, From, From, From, From, From, From, FromClasspath, FromClasspath, FromMap, getModelType
-
Constructor Details
-
Keyed
-
-
Method Details
-
AsBuilder
Description copied from class:KlumFactoryReturns the active-session factory used to create owned child Builders.- Overrides:
AsBuilderin classKlumFactory<T>
-
One
Creates a new instance of the model by only setting the key, but not applying any configuration (apart from 'postCreate' and 'postApply' methods).- Parameters:
key- The key to use for the model.- Returns:
- The instantiated object.
-
With
Creates a new instance of the model with the given key and applying the given configuration map and closure.- Parameters:
configMap- The configuration map to apply to the model.key- The key to use for the model.configuration- The configuration closure to apply to the model.- Returns:
- The instantiated object.
-
With
Deprecated, for removal: This API element is subject to removal in a future version.UseOne(String)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("bla")' will correctly work afterward.- Parameters:
key- The key to use for the model- Returns:
- The instantiated object.
-
With
Creates a new instance of the model with the given key and applying the given configuration closure.- Parameters:
key- The key to use for the model.configuration- The configuration closure to apply to the model.- Returns:
- The instantiated object.
-
With
Creates a new instance of the model with the given key and applying the given configuration map.- Parameters:
configMap- The configuration map to apply to the model.key- The key to use for the model.- Returns:
- The instantiated object.
-
From
Creates a new instance of the model with the given key and then applying the given text as configuration.- Parameters:
key- The key of the model to create.configuration- the configuration text to apply to the model.- Returns:
- The instantiated object.
-
From
Creates a new instance of the model with the given key and then applying the given text as configuration.- Parameters:
key- The key of the model to create.configuration- the configuration text to apply to the model.loader- The classloader used to compile the configuration text.- Returns:
- The instantiated object.
-
One(String)instead.