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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Boolean dryRun
    • Constructor Summary

      Constructors 
      Constructor Description
      CodegenParams()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CodegenParams

        CodegenParams()
    • Method Detail

      • getDryRun

         final Boolean getDryRun()

        Determines that module files will not be generated.

      • setDryRun

         final Unit setDryRun(Boolean dryRun)

        Determines that module files will not be generated.

      • 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).

      • set

         final <T extends Any> CodegenParams set(Class<T> clazz, Consumer<T> 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).