java.lang.Object
io.helidon.codegen.CodegenContextBase
- All Implemented Interfaces:
CodegenContext
Base of codegen context implementation taking care of the common parts of the API.
-
Constructor Summary
ModifierConstructorDescriptionprotected
CodegenContextBase
(CodegenOptions options, Set<Option<?>> additionalOptions, CodegenFiler filer, CodegenLogger logger, CodegenScope scope) Create a new instance with the common parts of the API. -
Method Summary
Modifier and TypeMethodDescriptionList of available annotation mappers in this environment.List of available element mappers in this environment.filer()
Filer to generate sources and resources.logger()
Logger to log messages according to the environment we run in (Annotation processor, Maven plugin, command line).Annotation packages supported by the mappers.Annotations supported by the mappers.options()
Code generation options.scope()
Current code generation scope.Codegen options supported by the mappers.List of available type mappers in this environment.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.codegen.CodegenContext
module, moduleName, typeInfo, typeInfo
-
Constructor Details
-
CodegenContextBase
protected CodegenContextBase(CodegenOptions options, Set<Option<?>> additionalOptions, CodegenFiler filer, CodegenLogger logger, CodegenScope scope) Create a new instance with the common parts of the API.- Parameters:
options
- codegen options for the current environmentadditionalOptions
- additional options to add to the list of supported optionsfiler
- filer abstraction for the current environmentlogger
- logger abstraction for the current environmentscope
- scope of the current environment
-
-
Method Details
-
elementMappers
Description copied from interface:CodegenContext
List of available element mappers in this environment. Used for example when discoveringCodegenContext.typeInfo(io.helidon.common.types.TypeName)
.- Specified by:
elementMappers
in interfaceCodegenContext
- Returns:
- list of mapper
-
typeMappers
Description copied from interface:CodegenContext
List of available type mappers in this environment. Used for example when discoveringCodegenContext.typeInfo(io.helidon.common.types.TypeName)
.- Specified by:
typeMappers
in interfaceCodegenContext
- Returns:
- list of mapper
-
annotationMappers
Description copied from interface:CodegenContext
List of available annotation mappers in this environment. Used for example when discoveringCodegenContext.typeInfo(io.helidon.common.types.TypeName)
.- Specified by:
annotationMappers
in interfaceCodegenContext
- Returns:
- list of mapper
-
mapperSupportedAnnotations
Description copied from interface:CodegenContext
Annotations supported by the mappers. This is augmented by the annotations supported by all extensions and used to discover types.- Specified by:
mapperSupportedAnnotations
in interfaceCodegenContext
- Returns:
- set of annotation types supported by the mapper
-
mapperSupportedAnnotationPackages
Description copied from interface:CodegenContext
Annotation packages supported by the mappers. This is augmented by the annotation packages supported by all extensions and used to discover types.- Specified by:
mapperSupportedAnnotationPackages
in interfaceCodegenContext
- Returns:
- set of annotation packages
-
supportedOptions
Description copied from interface:CodegenContext
Codegen options supported by the mappers. This is augmented by the options supported by all extensions.- Specified by:
supportedOptions
in interfaceCodegenContext
- Returns:
- set of supported options
-
filer
Description copied from interface:CodegenContext
Filer to generate sources and resources.- Specified by:
filer
in interfaceCodegenContext
- Returns:
- a filer abstraction
-
logger
Description copied from interface:CodegenContext
Logger to log messages according to the environment we run in (Annotation processor, Maven plugin, command line).- Specified by:
logger
in interfaceCodegenContext
- Returns:
- a logger abstraction
-
scope
Description copied from interface:CodegenContext
Current code generation scope. Usually guessed from the environment, can be overridden usingCodegenOptions.CODEGEN_SCOPE
- Specified by:
scope
in interfaceCodegenContext
- Returns:
- scope
-
options
Description copied from interface:CodegenContext
Code generation options.- Specified by:
options
in interfaceCodegenContext
- Returns:
- options of the current environment
-