org.jetbrains.jet.cli.common
Class CLICompiler<A extends CommonCompilerArguments>
java.lang.Object
org.jetbrains.jet.cli.common.CLICompiler<A>
- Direct Known Subclasses:
- K2JSCompiler, K2JVMCompiler
public abstract class CLICompiler<A extends CommonCompilerArguments>
- extends java.lang.Object
Method Summary |
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,
Services services,
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,
Services services,
A arguments)
|
ExitCode |
exec(java.io.PrintStream errStream,
java.lang.String... args)
|
ExitCode |
execAndOutputHtml(java.io.PrintStream errStream,
Services services,
java.lang.String... args)
|
java.util.List<CompilerPlugin> |
getCompilerPlugins()
|
protected void |
printVersionIfNeeded(MessageCollector messageCollector,
A arguments)
|
void |
setCompilerPlugins(java.util.List<CompilerPlugin> compilerPlugins)
|
protected void |
usage(java.io.PrintStream target,
boolean extraHelp)
Allow derived classes to add additional command line arguments |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLICompiler
public CLICompiler()
getCompilerPlugins
@NotNull
public java.util.List<CompilerPlugin> getCompilerPlugins()
setCompilerPlugins
public void setCompilerPlugins(@NotNull
java.util.List<CompilerPlugin> compilerPlugins)
exec
@NotNull
public ExitCode exec(@NotNull
java.io.PrintStream errStream,
@NotNull
java.lang.String... args)
execAndOutputHtml
@NotNull
public ExitCode execAndOutputHtml(@NotNull
java.io.PrintStream errStream,
@NotNull
Services services,
@NotNull
java.lang.String... args)
usage
protected void usage(@NotNull
java.io.PrintStream target,
boolean extraHelp)
- Allow derived classes to add additional command line arguments
configureEnvironment
protected void configureEnvironment(@NotNull
CompilerConfiguration configuration,
@NotNull
A arguments)
- Strategy method to configure the environment, allowing compiler
based tools to customise their own plugins
createArguments
@NotNull
protected abstract A createArguments()
exec
@NotNull
public ExitCode exec(@NotNull
MessageCollector messageCollector,
@NotNull
Services services,
@NotNull
A arguments)
doExecute
@NotNull
protected abstract ExitCode doExecute(@NotNull
A arguments,
@NotNull
Services services,
@NotNull
MessageCollector messageCollector,
@NotNull
com.intellij.openapi.Disposable rootDisposable)
printVersionIfNeeded
protected void printVersionIfNeeded(@NotNull
MessageCollector messageCollector,
@NotNull
A arguments)
doMain
public static void doMain(@NotNull
CLICompiler compiler,
@NotNull
java.lang.String[] args)
- Useful main for derived command line tools
doMainNoExit
@NotNull
public static ExitCode doMainNoExit(@NotNull
CLICompiler compiler,
@NotNull
java.lang.String[] args)