Class CodegenParams
-
- All Implemented Interfaces:
public final class CodegenParams
Code generation parameters container.
Parameters should be passed in an object of any class. The param object should have a parameterless constructor. Only one param object of a given class can be set.
-
-
Constructor Summary
Constructors Constructor Description CodegenParams()
-
Method Summary
Modifier and Type Method Description final Boolean
getDryRun()
Determines that module files will not be generated. final Unit
setDryRun(Boolean dryRun)
Determines that module files will not be generated. final CodegenParams
dryRun(Boolean dryRun)
final <T extends Any> T
get(Class<T> clazz)
Retrieves an object with parameters of the given class. final <T extends Any> T
get(KClass<T> clazz)
Retrieves an object with parameters of the given class. final <T extends Any> CodegenParams
set(T params)
Set params object. final <T extends Any> CodegenParams
set(KClass<T> clazz, Function1<T, Unit> updater)
Set or update params object. final <T extends Any> CodegenParams
set(Class<T> clazz, Consumer<T> updater)
Set or update params object. -
-
Method Detail
-
dryRun
final CodegenParams dryRun(Boolean dryRun)
-
get
final <T extends Any> T get(Class<T> clazz)
Retrieves an object with parameters of the given class.
If the parameter of the given class has not been set before, then the object will be created (the class should have parameterless constructor).
-
get
final <T extends Any> T get(KClass<T> clazz)
Retrieves an object with parameters of the given class.
If the parameter of the given class has not been set before, then the object will be created (the class should have parameterless constructor).
-
set
final <T extends Any> CodegenParams set(T params)
Set params object. If an object of the same class was previously added, it will be overwritten.
-
set
final <T extends Any> CodegenParams set(KClass<T> clazz, Function1<T, Unit> updater)
Set or update params object.
If the parameter of the given class has not been set before, then the object will be created (the class should have parameterless constructor).
-
-
-
-