T - the Configuration subclass which is loaded from the configuration filepublic abstract class EnvironmentCommand<T extends Configuration> extends ConfiguredCommand<T>
Environment.Configuration| Modifier | Constructor and Description |
|---|---|
protected |
EnvironmentCommand(Application<T> application,
String name,
String description)
Creates a new environment command.
|
| Modifier and Type | Method and Description |
|---|---|
Environment |
getEnvironment()
Returns the constructed environment or
null if it hasn't been constructed yet. |
protected void |
run(Bootstrap<T> bootstrap,
net.sourceforge.argparse4j.inf.Namespace namespace,
T configuration)
Runs the command with the given
Bootstrap and Configuration. |
protected abstract void |
run(Environment environment,
net.sourceforge.argparse4j.inf.Namespace namespace,
T configuration)
Runs the command with the given
Environment and Configuration. |
addFileArgument, cleanup, cleanupAsynchronously, configure, getConfiguration, getConfigurationClass, rungetDescription, getName, onErrorprotected EnvironmentCommand(Application<T> application, String name, String description)
application - the application providing this commandname - the name of the command, used for command line invocationdescription - a description of the command's purpose@Nullable public Environment getEnvironment()
null if it hasn't been constructed yet.null if it hasn't been constructed yetprotected void run(Bootstrap<T> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration) throws Exception
ConfiguredCommandBootstrap and Configuration.run in class ConfiguredCommand<T extends Configuration>bootstrap - the bootstrap bootstrapnamespace - the parsed command line namespaceconfiguration - the configuration objectException - if something goes wrongprotected abstract void run(Environment environment, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration) throws Exception
Environment and Configuration.environment - the configured environmentnamespace - the parsed command line namespaceconfiguration - the configuration objectException - if something goes wrongCopyright © 2021. All rights reserved.