java.lang.Object
io.helidon.codegen.CodegenContextDelegate
- All Implemented Interfaces:
CodegenContext
Base of codegen context implementation that delegates common parts of the API to an existing instance.
-
Constructor Summary
ModifierConstructorDescriptionprotected
CodegenContextDelegate
(CodegenContext delegate) Create a new instance delegating all calls to the delegate. -
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.module()
Module that is being processed.options()
Code generation options.scope()
Current code generation scope.Codegen options supported by the mappers.Discover information about the provided type.typeInfo
(TypeName typeName, Predicate<TypedElementInfo> elementPredicate) Discover information about the provided type, with a predicate for child elements.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
moduleName
-
Constructor Details
-
CodegenContextDelegate
Create a new instance delegating all calls to the delegate.- Parameters:
delegate
- to use for all methods
-
-
Method Details
-
module
Description copied from interface:CodegenContext
Module that is being processed.- Specified by:
module
in interfaceCodegenContext
- Returns:
- module info if defined, for modules without
module-info.java
returns empty optional
-
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
-
typeInfo
Description copied from interface:CodegenContext
Discover information about the provided type.- Specified by:
typeInfo
in interfaceCodegenContext
- Parameters:
typeName
- type name to discover- Returns:
- discovered type information, or empty if the type cannot be discovered
-
typeInfo
Description copied from interface:CodegenContext
Discover information about the provided type, with a predicate for child elements.- Specified by:
typeInfo
in interfaceCodegenContext
- Parameters:
typeName
- type name to discoverelementPredicate
- predicate for child elements- Returns:
- discovered type information, or empty if the type cannot be discovered
-
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
-