Module io.helidon.service.codegen
Package io.helidon.service.codegen.spi
Interface InjectAssignment.Assignment
- Enclosing interface:
InjectAssignment
public static interface InjectAssignment.Assignment
Assignment for code generation. The original intended purpose is to support
Provider
from javax and jakarta
without a dependency (or need to understand it) in the generator code.-
Method Summary
Modifier and TypeMethodDescriptionCode generator that creates appropriate type required by the target.static InjectAssignment.Assignment
create
(TypeName usedType, Consumer<ContentBuilder<?>> codeGenerator) Create a new assignment instance.usedType()
Type to use as the dependency type using only Helidon supported types (i.e.
-
Method Details
-
create
static InjectAssignment.Assignment create(TypeName usedType, Consumer<ContentBuilder<?>> codeGenerator) Create a new assignment instance.- Parameters:
usedType
- type to usecodeGenerator
- code generator- Returns:
- a new assignment
-
usedType
TypeName usedType()Type to use as the dependency type using only Helidon supported types (i.e.Supplier
instead of jakartaProvider
).- Returns:
- Helidon supported type
-
codeGenerator
Consumer<ContentBuilder<?>> codeGenerator()Code generator that creates appropriate type required by the target.- Returns:
- consumer of method content builder
-