You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Builders can be used to construct the exact environment needed.
For example:
import org.tomitribe.crest.Main;
public class Example {
public static void main(String[] args) {
final Main main = Main.builder()
.properties(System.getProperties())
.env(System.getenv())
.out(System.out)
.err(System.err)
.in(System.in)
.exit(System::exit)
.command(PizzaCommands.class)
.command(SandwichCommands.class)
.build();
main.run(args);
}
}
The above can be reduced further using the following convenience builder method that defaults most the above:
import org.tomitribe.crest.Main;
public class Example {
public static void main(String[] args) {
final Main main = Main.systemDefaults()
.command(PizzaCommands.class)
.command(SandwichCommands.class)
.build();
main.run(args);
}
}
The text was updated successfully, but these errors were encountered:
Builders can be used to construct the exact environment needed.
For example:
The above can be reduced further using the following convenience builder method that defaults most the above:
The text was updated successfully, but these errors were encountered: