public class BootiqueMain extends Object
Modifier and Type | Field and Description |
---|---|
static String |
D_PATTERN
Pattern for command-line definition.
|
static String |
DEFAULT_LOG_FORMAT
Default log format for a bootique app.
|
static int |
ERROR_CODE
Return code when failure.
|
Constructor and Description |
---|
BootiqueMain(experimental : boolean,
providers : io.bootique.BQModuleProvider*)
Constructor.
|
BootiqueMain(providers : io.bootique.BQModuleProvider*)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected io.bootique.BQRuntime |
createRuntime(modules : Class<? extends io.bootique.BQModuleProvider>[],
args : String*)
Create the compiler runtime.
|
protected io.bootique.BQRuntime |
createRuntime(args : String*)
Create the compiler runtime.
|
static String[] |
filterCommandLineArguments(args : String[])
Filter the command-line arguments for extracting the -D parameters.
|
List<io.bootique.help.HelpOption> |
getOptions()
Replies the options of the program.
|
List<io.bootique.help.HelpOption> |
getOptionsForModules(modules : Class<? extends io.bootique.BQModuleProvider>[])
Replies the options of the program that are provided by a specific set of modules.
|
static Class<? extends io.bootique.BQModuleProvider>[] |
getStaticModuleProvidersFor(names : String[])
Replies the statically defined modules.
|
boolean |
isExperimental()
Replies if this application is an experimental application.
|
int |
runCommand(args : String*)
Run the associated commands.
|
public static val
ERROR_CODE : int
BootiqueMain
public static val
DEFAULT_LOG_FORMAT : String
BootiqueMain
public static val
D_PATTERN : String
BootiqueMain
public new
(providers : io.bootique.BQModuleProvider*)
providers
- the providers of module that injects application-specific components.public new
(experimental : boolean,
providers : io.bootique.BQModuleProvider*)
experimental
- indicates if the application is experimental.providers
- the providers of module that injects application-specific components.public def
isExperimental() : boolean
BootiqueMain
Usually a warning message is displayed at launch time when the application is experimental.
true
if experimental.protected def
createRuntime(args : String*) : io.bootique.BQRuntime
BootiqueMain
BQModuleProvider
provider.
Use with caution, you may load more modules than you expected.
Make sure only needed Bootique dependencies are included on class-path.
If in doubt, switch to explicit Module loading via BootiqueMain.createRuntime(Class[], String...)
.args
- the command line arguments.protected def
createRuntime(modules : Class<? extends io.bootique.BQModuleProvider>[],
args : String*) : io.bootique.BQRuntime
BootiqueMain
modules
- the list of module to be loaded.args
- the command line arguments.public def
runCommand(args : String*) : int
BootiqueMain
This function runs the command and exits with the return code.
args
- the command line arguments.public final def
getOptions() : List<io.bootique.help.HelpOption>
BootiqueMain
BQModuleProvider
provider.
Use with caution, you may load more modules than you expected.
Make sure only needed Bootique dependencies are included on class-path.
If in doubt, switch to explicit Module loading via BootiqueMain.getOptionsForModules(Class...)
.public final def
getOptionsForModules(modules : Class<? extends io.bootique.BQModuleProvider>[]) : List<io.bootique.help.HelpOption>
BootiqueMain
modules
- the list of modules to be loaded.public static def
getStaticModuleProvidersFor(names : String[]) : Class<? extends io.bootique.BQModuleProvider>[]
BootiqueMain
names
- the list of fully-qualified names of the modules providers.public static def
filterCommandLineArguments(args : String[]) : String[]
BootiqueMain
args
- the arguments.Copyright © 2021 the original authors or authors.