public interface CodegenOptions
Configuration options.
-
Field Summary
Modifier and TypeFieldDescriptionCodegen option to configure module name of the module being processed.Codegen option to configure module name of the module being processed.static final Option
<CodegenScope> Codegen option to configure codegen scope.Codegen option to configure creation of META-INF services when module-info.java is present.Codegen option to configure how many times to repeat theINDENT_TYPE
for indentation.static final Option
<IndentType> Codegen option to configure which indent type to use (a space character, or a tab character).static final String
Tag to define custom module name.static final String
Tag to define custom package name. -
Method Summary
Modifier and TypeMethodDescriptionList of string options.Set of string options.default boolean
Boolean option that defaults to false.Find an option.default <T extends Enum<T>>
TEnumeration option.default void
Validate options against the permitted options.
-
Field Details
-
TAG_CODEGEN_MODULE
Tag to define custom module name.- See Also:
-
TAG_CODEGEN_PACKAGE
Tag to define custom package name.- See Also:
-
CODEGEN_SCOPE
Codegen option to configure codegen scope. -
CODEGEN_MODULE
Codegen option to configure module name of the module being processed. -
CODEGEN_PACKAGE
Codegen option to configure module name of the module being processed. -
INDENT_TYPE
Codegen option to configure which indent type to use (a space character, or a tab character). -
INDENT_COUNT
Codegen option to configure how many times to repeat theINDENT_TYPE
for indentation.Defaults to
4
. -
CREATE_META_INF_SERVICES
Codegen option to configure creation of META-INF services when module-info.java is present. Defaults totrue
, so the file is generated.
-
-
Method Details
-
option
Find an option.- Parameters:
option
- option name- Returns:
- option value if configured
-
option
Enumeration option.- Type Parameters:
T
- type of the enum- Parameters:
option
- option namedefaultValue
- default valueenumType
- 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
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
List of string options.- Parameters:
option
- option name- Returns:
- list of values, or an empty list if not defined
-
asSet
Set of string options.- Parameters:
option
- option name- Returns:
- set of values, or an empty list if not defined
-
validate
Validate options against the permitted options. The implementations in Helidon only validatehelidon.
prefixed options.- Parameters:
permittedOptions
- options permitted by the codegen in progress
-