Standalone version of the Lingua Franca formatter (lff).
More...
Inherits org.lflang.cli.CliBase.
|
| void | doExecute (Io io, String[] args) |
| void | doRun () |
| | Validates all paths and invokes the formatter on the input paths.
|
| Resource | getResource (Path path) |
| | Obtains a resource from a path.
|
| List< LfIssue > | printErrorsIfAny () |
| | If any warnings were collected, print them, then return them.
|
| List< LfIssue > | printWarningsIfAny () |
| | If any warnings were collected, print them, then return them.
|
| void | run () |
| | The entrypoint of Picocli applications - the first method called when CliBase, which implements the Runnable interface, is instantiated.
|
| void | validateResource (Resource resource) |
| | Validates a given resource.
|
|
| static Injector | getInjector (String toolName, Io io) |
| static void | main (Io io, final String... args) |
| | Programmatic entry point, with a custom IO.
|
| static void | main (String[] args) |
| | Main function of the formatter.
|
|
| static void | cliMain (String toolName, Class<? extends CliBase > toolClass, Io io, String[] args) |
|
| Io | io |
| | IO context of this run.
|
| IssueCollector | issueCollector |
| | Used to collect all errors that happen during validation/generation.
|
| MessageReporter | messageReporter |
| | Used to report error messages at the end.
|
| ReportingBackend | reporter |
| | Used to report error messages at the end.
|
|
| CommandSpec | spec |
| | Models a command specification, including the options, positional parameters and subcommands supported by the command.
|
| MutuallyExclusive | topLevelArg |
Standalone version of the Lingua Franca formatter (lff).
Based on lfc.
- Author
- Marten Lohstroh
-
Christian Menard
-
Billy Bao
-
Atharva Patil
◆ cliMain()
| void org.lflang.cli.CliBase.cliMain |
( |
String | toolName, |
|
|
Class<? extends CliBase > | toolClass, |
|
|
Io | io, |
|
|
String[] | args ) |
|
staticprotectedinherited |
◆ doExecute()
| void org.lflang.cli.CliBase.doExecute |
( |
Io | io, |
|
|
String[] | args ) |
|
inherited |
◆ doRun()
| void org.lflang.cli.Lff.doRun |
( |
| ) |
|
◆ exitIfCollectedErrors()
| void org.lflang.cli.CliBase.exitIfCollectedErrors |
( |
| ) |
|
|
protectedinherited |
If some errors were collected, print them and abort execution.
Otherwise, return.
◆ getInjector()
| Injector org.lflang.cli.CliBase.getInjector |
( |
String | toolName, |
|
|
Io | io ) |
|
staticinherited |
◆ getInputPaths()
| List< Path > org.lflang.cli.CliBase.getInputPaths |
( |
| ) |
|
|
protectedinherited |
Returns the validated input paths.
- Returns
- Validated input paths.
◆ getJsonObject()
| final JsonObject org.lflang.cli.CliBase.getJsonObject |
( |
| ) |
|
|
protectedinherited |
◆ getOutputRoot()
| Path org.lflang.cli.CliBase.getOutputRoot |
( |
| ) |
|
|
protectedinherited |
Returns the validated, normalized output path.
- Returns
- Validated, normalized output path.
◆ getResource()
| Resource org.lflang.cli.CliBase.getResource |
( |
Path | path | ) |
|
|
inherited |
Obtains a resource from a path.
Returns null if path is not an LF file.
- Parameters
-
| path | The path to obtain the resource from. |
- Returns
- The obtained resource. Set to null if path is not an LF file.
◆ main() [1/2]
| void org.lflang.cli.Lff.main |
( |
Io | io, |
|
|
final String... | args ) |
|
static |
Programmatic entry point, with a custom IO.
- Parameters
-
| io | IO streams. |
| args | Command-line arguments. |
◆ main() [2/2]
| void org.lflang.cli.Lff.main |
( |
String[] | args | ) |
|
|
static |
Main function of the formatter.
Caution: this will invoke System.exit.
- Parameters
-
◆ printErrorsIfAny()
| List< LfIssue > org.lflang.cli.CliBase.printErrorsIfAny |
( |
| ) |
|
|
inherited |
If any warnings were collected, print them, then return them.
- Returns
- A list of collected errors.
◆ printWarningsIfAny()
| List< LfIssue > org.lflang.cli.CliBase.printWarningsIfAny |
( |
| ) |
|
|
inherited |
If any warnings were collected, print them, then return them.
- Returns
- A list of collected warnings.
◆ run()
| void org.lflang.cli.CliBase.run |
( |
| ) |
|
|
inherited |
The entrypoint of Picocli applications - the first method called when CliBase, which implements the Runnable interface, is instantiated.
◆ stdinMode()
| final boolean org.lflang.cli.CliBase.stdinMode |
( |
| ) |
|
|
protectedinherited |
◆ toAbsolutePath()
| Path org.lflang.cli.CliBase.toAbsolutePath |
( |
Path | other | ) |
|
|
protectedinherited |
Resolve to an absolute path, in the given io context.
◆ validateResource()
| void org.lflang.cli.CliBase.validateResource |
( |
Resource | resource | ) |
|
|
inherited |
Validates a given resource.
If issues arise during validation, these are recorded using the issue collector.
- Parameters
-
| resource | The resource to validate. |
◆ io
| Io org.lflang.cli.CliBase.io |
|
protectedinherited |
◆ issueCollector
| IssueCollector org.lflang.cli.CliBase.issueCollector |
|
protectedinherited |
Used to collect all errors that happen during validation/generation.
◆ messageReporter
Used to report error messages at the end.
◆ reporter
| ReportingBackend org.lflang.cli.CliBase.reporter |
|
protectedinherited |
Used to report error messages at the end.
◆ spec
| CommandSpec org.lflang.cli.CliBase.spec |
|
packageinherited |
Models a command specification, including the options, positional parameters and subcommands supported by the command.
◆ topLevelArg
The documentation for this class was generated from the following file:
- /Users/runner/work/lingua-franca/lingua-franca/cli/lff/src/main/java/org/lflang/cli/Lff.java