Interface CodegenOptions


public interface CodegenOptions
Configuration options.
  • Field Details

    • TAG_CODEGEN_MODULE

      static final String TAG_CODEGEN_MODULE
      Tag to define custom module name.
      See Also:
    • TAG_CODEGEN_PACKAGE

      static final String TAG_CODEGEN_PACKAGE
      Tag to define custom package name.
      See Also:
    • CODEGEN_SCOPE

      static final Option<CodegenScope> CODEGEN_SCOPE
      Codegen option to configure codegen scope.
    • CODEGEN_MODULE

      static final Option<String> CODEGEN_MODULE
      Codegen option to configure module name of the module being processed.
    • CODEGEN_PACKAGE

      static final Option<String> CODEGEN_PACKAGE
      Codegen option to configure module name of the module being processed.
    • INDENT_TYPE

      static final Option<IndentType> INDENT_TYPE
      Codegen option to configure which indent type to use (a space character, or a tab character).
    • INDENT_COUNT

      static final Option<Integer> INDENT_COUNT
      Codegen option to configure how many times to repeat the INDENT_TYPE for indentation.

      Defaults to 4.

    • CREATE_META_INF_SERVICES

      static final Option<Boolean> CREATE_META_INF_SERVICES
      Codegen option to configure creation of META-INF services when module-info.java is present. Defaults to true, so the file is generated.
  • Method Details

    • option

      Optional<String> option(String option)
      Find an option.
      Parameters:
      option - option name
      Returns:
      option value if configured
    • option

      default <T extends Enum<T>> T option(String option, T defaultValue, Class<T> enumType)
      Enumeration option.
      Type Parameters:
      T - type of the enum
      Parameters:
      option - option name
      defaultValue - default value
      enumType - type of the enum
      Returns:
      option value, or default value if not defined
      Throws:
      IllegalArgumentException - in case the enum value is not valid for the provided enum type
    • enabled

      default boolean enabled(Option<Boolean> option)
      Boolean option that defaults to false.
      Parameters:
      option - option to check
      Returns:
      whether the option is enabled (e.g. its value is explicitly configured to true)
    • asList

      default List<String> asList(String option)
      List of string options.
      Parameters:
      option - option name
      Returns:
      list of values, or an empty list if not defined
    • asSet

      default Set<String> asSet(String option)
      Set of string options.
      Parameters:
      option - option name
      Returns:
      set of values, or an empty list if not defined
    • validate

      default void validate(Set<Option<?>> permittedOptions)
      Validate options against the permitted options. The implementations in Helidon only validate helidon. prefixed options.
      Parameters:
      permittedOptions - options permitted by the codegen in progress