public abstract class AbstractContainerCommand extends CommandWithPluginManager
Modifier and Type | Field and Description |
---|---|
protected String |
commandArgsFile |
Constructor and Description |
---|
AbstractContainerCommand() |
Modifier and Type | Method and Description |
---|---|
ParsingContext |
createParsingContext(Cell cell,
com.google.common.util.concurrent.ListeningExecutorService executor)
Creates a basic
ParsingContext with some options populated from command's arguments. |
CellConfig |
getConfigOverrides(com.google.common.collect.ImmutableMap<CellName,AbsPath> cellMapping) |
protected abstract String |
getContainerCommandPrefix() |
Iterable<BuckEventListener> |
getEventListeners(Map<ExecutorPool,com.google.common.util.concurrent.ListeningExecutorService> executorPool,
ScheduledExecutorService scheduledExecutorService)
If any of these listeners also extends Closeable, it will be closed by Main.
|
Optional<String> |
getHostPlatform() |
LogConfigSetup |
getLogConfig() |
protected abstract Optional<Command> |
getSubcommand() |
protected String |
getSubcommandsFieldName() |
com.google.common.collect.ImmutableList<String> |
getTargetPlatforms() |
boolean |
isSourceControlStatsGatheringEnabled() |
boolean |
performsBuild() |
void |
printUsage(PrintStream stream) |
ExitCode |
run(CommandRunnerParams params) |
Optional<ExitCode> |
runHelp(PrintStream stream)
If the current command is a help command, run the action to print out the appropriate help
message.
|
getPluginManager, setPluginManager
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getShortDescription, isReadOnly
protected String getSubcommandsFieldName()
protected abstract String getContainerCommandPrefix()
public Optional<ExitCode> runHelp(PrintStream stream)
Command
This is an optimization to avoid initializing everything in CommandRunnerParams, in order to return help strings quickly.
stream
- stream to output the help text.public ExitCode run(CommandRunnerParams params) throws Exception
Exception
public void printUsage(PrintStream stream)
public CellConfig getConfigOverrides(com.google.common.collect.ImmutableMap<CellName,AbsPath> cellMapping)
public LogConfigSetup getLogConfig()
public boolean isSourceControlStatsGatheringEnabled()
public Iterable<BuckEventListener> getEventListeners(Map<ExecutorPool,com.google.common.util.concurrent.ListeningExecutorService> executorPool, ScheduledExecutorService scheduledExecutorService)
Command
public boolean performsBuild()
public com.google.common.collect.ImmutableList<String> getTargetPlatforms()
public ParsingContext createParsingContext(Cell cell, com.google.common.util.concurrent.ListeningExecutorService executor)
Command
ParsingContext
with some options populated from command's arguments.