public class Cli extends Object
Constructor and Description |
---|
Cli(JarLocation location,
Bootstrap<?> bootstrap,
OutputStream stdOut,
OutputStream stdErr)
Create a new CLI interface for a application and its bootstrapped environment.
|
Modifier and Type | Method and Description |
---|---|
PrintWriter |
getStdErr() |
PrintWriter |
getStdOut() |
Optional<Throwable> |
run(String... arguments)
Runs the command line interface given some arguments.
|
public Cli(JarLocation location, Bootstrap<?> bootstrap, OutputStream stdOut, OutputStream stdErr)
location
- the location of the applicationbootstrap
- the bootstrap for the applicationstdOut
- standard outstdErr
- standard errpublic Optional<Throwable> run(String... arguments)
arguments
- the command line argumentspublic PrintWriter getStdOut()
public PrintWriter getStdErr()
Copyright © 2020. All rights reserved.