Package io.quarkus.deployment
Class CodeGenerator
java.lang.Object
io.quarkus.deployment.CodeGenerator
A set of methods to initialize and execute
CodeGenProviders.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddumpCurrentConfigValues(io.quarkus.bootstrap.model.ApplicationModel appModel, String launchMode, Properties buildSystemProps, io.quarkus.bootstrap.classloading.QuarkusClassLoader deploymentClassLoader, Properties previouslyRecordedProperties, Path outputFile) Initializes an application build time configuration and dumps current values of properties passed in aspreviouslyRecordedPropertiesto a file.static org.eclipse.microprofile.config.ConfiggetConfig(io.quarkus.bootstrap.model.ApplicationModel appModel, io.quarkus.runtime.LaunchMode launchMode, Properties buildSystemProps, io.quarkus.bootstrap.classloading.QuarkusClassLoader deploymentClassLoader) static List<CodeGenData> init(io.quarkus.bootstrap.model.ApplicationModel model, Map<String, String> properties, ClassLoader deploymentClassLoader, Collection<DevModeContext.ModuleInfo> modules) static voidinitAndRun(io.quarkus.bootstrap.classloading.QuarkusClassLoader classLoader, io.quarkus.paths.PathCollection sourceParentDirs, Path generatedSourcesDir, Path buildDir, Consumer<Path> sourceRegistrar, io.quarkus.bootstrap.model.ApplicationModel appModel, Properties properties, String launchMode, boolean test) static <T> TreadConfig(io.quarkus.bootstrap.model.ApplicationModel appModel, io.quarkus.runtime.LaunchMode launchMode, Properties buildSystemProps, io.quarkus.bootstrap.classloading.QuarkusClassLoader deploymentClassLoader, Function<BuildTimeConfigurationReader, T> function) static booleantrigger(ClassLoader deploymentClassLoader, CodeGenData data, io.quarkus.bootstrap.model.ApplicationModel appModel, org.eclipse.microprofile.config.Config config, boolean test) generate sources for given code gen
-
Constructor Details
-
CodeGenerator
public CodeGenerator()
-
-
Method Details
-
initAndRun
public static void initAndRun(io.quarkus.bootstrap.classloading.QuarkusClassLoader classLoader, io.quarkus.paths.PathCollection sourceParentDirs, Path generatedSourcesDir, Path buildDir, Consumer<Path> sourceRegistrar, io.quarkus.bootstrap.model.ApplicationModel appModel, Properties properties, String launchMode, boolean test) throws io.quarkus.bootstrap.prebuild.CodeGenException - Throws:
io.quarkus.bootstrap.prebuild.CodeGenException
-
init
public static List<CodeGenData> init(io.quarkus.bootstrap.model.ApplicationModel model, Map<String, String> properties, ClassLoader deploymentClassLoader, Collection<DevModeContext.ModuleInfo> modules) throws io.quarkus.bootstrap.prebuild.CodeGenException- Throws:
io.quarkus.bootstrap.prebuild.CodeGenException
-
trigger
public static boolean trigger(ClassLoader deploymentClassLoader, CodeGenData data, io.quarkus.bootstrap.model.ApplicationModel appModel, org.eclipse.microprofile.config.Config config, boolean test) throws io.quarkus.bootstrap.prebuild.CodeGenException generate sources for given code gen- Parameters:
deploymentClassLoader- deployment classloaderdata- code genappModel- app modelconfig- config instancetest- whether the sources are generated for production code or tests- Returns:
- true if sources have been created
- Throws:
io.quarkus.bootstrap.prebuild.CodeGenException- on failure
-
dumpCurrentConfigValues
public static void dumpCurrentConfigValues(io.quarkus.bootstrap.model.ApplicationModel appModel, String launchMode, Properties buildSystemProps, io.quarkus.bootstrap.classloading.QuarkusClassLoader deploymentClassLoader, Properties previouslyRecordedProperties, Path outputFile) Initializes an application build time configuration and dumps current values of properties passed in aspreviouslyRecordedPropertiesto a file.- Parameters:
appModel- application modellaunchMode- launch modebuildSystemProps- build system (or project) propertiesdeploymentClassLoader- build classloaderpreviouslyRecordedProperties- properties to read from the initialized configurationoutputFile- output file
-
getConfig
public static org.eclipse.microprofile.config.Config getConfig(io.quarkus.bootstrap.model.ApplicationModel appModel, io.quarkus.runtime.LaunchMode launchMode, Properties buildSystemProps, io.quarkus.bootstrap.classloading.QuarkusClassLoader deploymentClassLoader) throws io.quarkus.bootstrap.prebuild.CodeGenException - Throws:
io.quarkus.bootstrap.prebuild.CodeGenException
-
readConfig
public static <T> T readConfig(io.quarkus.bootstrap.model.ApplicationModel appModel, io.quarkus.runtime.LaunchMode launchMode, Properties buildSystemProps, io.quarkus.bootstrap.classloading.QuarkusClassLoader deploymentClassLoader, Function<BuildTimeConfigurationReader, T> function) throws io.quarkus.bootstrap.prebuild.CodeGenException- Throws:
io.quarkus.bootstrap.prebuild.CodeGenException
-