public abstract class CLICompiler<A extends CompilerArguments> extends java.lang.Object
Constructor and Description |
---|
CLICompiler() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureEnvironment(CompilerConfiguration configuration,
A arguments)
Strategy method to configure the environment, allowing compiler
based tools to customise their own plugins
|
protected abstract A |
createArguments() |
protected abstract ExitCode |
doExecute(A arguments,
MessageCollector messageCollector,
com.intellij.openapi.Disposable rootDisposable) |
static void |
doMain(CLICompiler compiler,
java.lang.String[] args)
Useful main for derived command line tools
|
static ExitCode |
doMainNoExit(CLICompiler compiler,
java.lang.String[] args) |
ExitCode |
exec(MessageCollector messageCollector,
A arguments) |
ExitCode |
exec(java.io.PrintStream errStream,
A arguments)
Executes the compiler on the parsed arguments
|
ExitCode |
exec(java.io.PrintStream errStream,
java.lang.String... args) |
protected MessageRenderer |
getMessageRenderer(A arguments) |
protected boolean |
parseArguments(java.io.PrintStream errStream,
A arguments,
java.lang.String[] args)
Returns true if the arguments can be parsed correctly
|
protected void |
printVersionIfNeeded(java.io.PrintStream errStream,
A arguments,
MessageRenderer messageRenderer) |
protected void |
usage(java.io.PrintStream target)
Allow derived classes to add additional command line arguments
|
public CLICompiler()
@NotNull public ExitCode exec(@NotNull java.io.PrintStream errStream, @NotNull java.lang.String... args)
protected boolean parseArguments(@NotNull java.io.PrintStream errStream, @NotNull A arguments, @NotNull java.lang.String[] args)
protected void usage(@NotNull java.io.PrintStream target)
protected void configureEnvironment(@NotNull CompilerConfiguration configuration, @NotNull A arguments)
@NotNull protected abstract A createArguments()
@NotNull public ExitCode exec(@NotNull java.io.PrintStream errStream, @NotNull A arguments)
@NotNull public ExitCode exec(@NotNull MessageCollector messageCollector, @NotNull A arguments)
@NotNull protected abstract ExitCode doExecute(A arguments, MessageCollector messageCollector, com.intellij.openapi.Disposable rootDisposable)
@NotNull protected MessageRenderer getMessageRenderer(@NotNull A arguments)
protected void printVersionIfNeeded(@NotNull java.io.PrintStream errStream, @NotNull A arguments, @NotNull MessageRenderer messageRenderer)
public static void doMain(@NotNull CLICompiler compiler, @NotNull java.lang.String[] args)
@NotNull public static ExitCode doMainNoExit(@NotNull CLICompiler compiler, @NotNull java.lang.String[] args)