public interface Command
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) |
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() |
org.pf4j.PluginManager |
getPluginManager() |
String |
getShortDescription() |
com.google.common.collect.ImmutableList<String> |
getTargetPlatforms() |
boolean |
isReadOnly() |
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.
|
void |
setPluginManager(org.pf4j.PluginManager pluginManager) |
ExitCode run(CommandRunnerParams params) throws Exception
Exception
Optional<ExitCode> runHelp(PrintStream stream)
This is an optimization to avoid initializing everything in CommandRunnerParams, in order to return help strings quickly.
stream
- stream to output the help text.boolean isReadOnly()
boolean isSourceControlStatsGatheringEnabled()
String getShortDescription()
CellConfig getConfigOverrides(com.google.common.collect.ImmutableMap<CellName,AbsPath> cellMapping)
LogConfigSetup getLogConfig()
Iterable<BuckEventListener> getEventListeners(Map<ExecutorPool,com.google.common.util.concurrent.ListeningExecutorService> executorPool, ScheduledExecutorService scheduledExecutorService)
void printUsage(PrintStream stream)
boolean performsBuild()
void setPluginManager(org.pf4j.PluginManager pluginManager)
org.pf4j.PluginManager getPluginManager()
com.google.common.collect.ImmutableList<String> getTargetPlatforms()
ParsingContext createParsingContext(Cell cell, com.google.common.util.concurrent.ListeningExecutorService executor)
ParsingContext
with some options populated from command's arguments.