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
ConstructorsModifierConstructorDescriptionprotectedCodegenContextBase(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, waitMethods 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:CodegenContextList of available element mappers in this environment. Used for example when discoveringCodegenContext.typeInfo(io.helidon.common.types.TypeName).- Specified by:
elementMappersin interfaceCodegenContext- Returns:
- list of mapper
-
typeMappers
Description copied from interface:CodegenContextList of available type mappers in this environment. Used for example when discoveringCodegenContext.typeInfo(io.helidon.common.types.TypeName).- Specified by:
typeMappersin interfaceCodegenContext- Returns:
- list of mapper
-
annotationMappers
Description copied from interface:CodegenContextList of available annotation mappers in this environment. Used for example when discoveringCodegenContext.typeInfo(io.helidon.common.types.TypeName).- Specified by:
annotationMappersin interfaceCodegenContext- Returns:
- list of mapper
-
mapperSupportedAnnotations
Description copied from interface:CodegenContextAnnotations supported by the mappers. This is augmented by the annotations supported by all extensions and used to discover types.- Specified by:
mapperSupportedAnnotationsin interfaceCodegenContext- Returns:
- set of annotation types supported by the mapper
-
mapperSupportedAnnotationPackages
Description copied from interface:CodegenContextAnnotation packages supported by the mappers. This is augmented by the annotation packages supported by all extensions and used to discover types.- Specified by:
mapperSupportedAnnotationPackagesin interfaceCodegenContext- Returns:
- set of annotation packages
-
supportedOptions
Description copied from interface:CodegenContextCodegen options supported by the mappers. This is augmented by the options supported by all extensions.- Specified by:
supportedOptionsin interfaceCodegenContext- Returns:
- set of supported options
-
filer
Description copied from interface:CodegenContextFiler to generate sources and resources.- Specified by:
filerin interfaceCodegenContext- Returns:
- a filer abstraction
-
logger
Description copied from interface:CodegenContextLogger to log messages according to the environment we run in (Annotation processor, Maven plugin, command line).- Specified by:
loggerin interfaceCodegenContext- Returns:
- a logger abstraction
-
scope
Description copied from interface:CodegenContextCurrent code generation scope. Usually guessed from the environment, can be overridden usingCodegenOptions.CODEGEN_SCOPE- Specified by:
scopein interfaceCodegenContext- Returns:
- scope
-
options
Description copied from interface:CodegenContextCode generation options.- Specified by:
optionsin interfaceCodegenContext- Returns:
- options of the current environment
-