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
ConstructorsModifierConstructorDescriptionprotectedCodegenContextDelegate(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, waitMethods 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:CodegenContextModule that is being processed.- Specified by:
modulein interfaceCodegenContext- Returns:
- module info if defined, for modules without
module-info.javareturns empty optional
-
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
-
typeInfo
Description copied from interface:CodegenContextDiscover information about the provided type.- Specified by:
typeInfoin interfaceCodegenContext- Parameters:
typeName- type name to discover- Returns:
- discovered type information, or empty if the type cannot be discovered
-
typeInfo
Description copied from interface:CodegenContextDiscover information about the provided type, with a predicate for child elements.- Specified by:
typeInfoin 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: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
-