Package io.quarkus.deployment
Interface CodeGenProvider
-
public interface CodeGenProvider
Service providers for this interface are triggered during generate-sources phase of build of Quarkus applications
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
inputDirectory()
Name of the directory containing input files for a givenCodeGenProvider
implementation relative to a sources root directory.String
inputExtension()
File extension that CodeGenProvider will generate code fromString
providerId()
default boolean
shouldRun(Path sourceDir, org.eclipse.microprofile.config.Config config)
boolean
trigger(CodeGenContext context)
Trigger code generation
-
-
-
Method Detail
-
providerId
@NotNull String providerId()
- Returns:
- unique name of the code gen provider, will correspond to the directory in
generated-sources
-
inputExtension
@NotNull String inputExtension()
File extension that CodeGenProvider will generate code from- Returns:
- file extension
-
inputDirectory
@NotNull String inputDirectory()
Name of the directory containing input files for a givenCodeGenProvider
implementation relative to a sources root directory. For example, if an input directory is configured asfoo
, for a production build of an application the sources will be looked up atsrc/main/foo
path and atsrc/test/foo
for tests.- Returns:
- the input directory
-
trigger
boolean trigger(CodeGenContext context) throws CodeGenException
Trigger code generation- Parameters:
context
- code generation context- Returns:
- true if files were generated/modified
- Throws:
CodeGenException
-
shouldRun
default boolean shouldRun(Path sourceDir, org.eclipse.microprofile.config.Config config)
-
-