lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.cli.Lfd Class Reference

Command lin tool for generating diagrams from Lingua Franca programs. More...

Inherits org.lflang.cli.CliBase.

Public Member Functions

void doExecute (Io io, String[] args)
void doRun ()
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 Public Member Functions

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 entry point of the diagram tool.

Protected Member Functions

void exitIfCollectedErrors ()
 If some errors were collected, print them and abort execution.
List< Path > getInputPaths ()
 Returns the validated input paths.
final JsonObject getJsonObject ()
Path getOutputRoot ()
 Returns the validated, normalized output path.
final boolean stdinMode ()
Path toAbsolutePath (Path other)
 Resolve to an absolute path, in the given io context.

Static Protected Member Functions

static void cliMain (String toolName, Class<? extends CliBase > toolClass, Io io, String[] args)

Protected Attributes

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.

Package Attributes

CommandSpec spec
 Models a command specification, including the options, positional parameters and subcommands supported by the command.
MutuallyExclusive topLevelArg

Detailed Description

Command lin tool for generating diagrams from Lingua Franca programs.

Author
Christian Menard

Member Function Documentation

◆ 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.Lfd.doRun ( )

Reimplemented from org.lflang.cli.CliBase.

◆ 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
pathThe 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.Lfd.main ( Io io,
final String... args )
static

Programmatic entry point, with a custom IO.

Parameters
ioIO streams.
argsCommand-line arguments.

◆ main() [2/2]

void org.lflang.cli.Lfd.main ( String[] args)
static

Main entry point of the diagram tool.

Parameters
argsCLI arguments

◆ 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
resourceThe resource to validate.

Member Data Documentation

◆ io

Io org.lflang.cli.CliBase.io
protectedinherited

IO context of this run.

◆ issueCollector

IssueCollector org.lflang.cli.CliBase.issueCollector
protectedinherited

Used to collect all errors that happen during validation/generation.

◆ messageReporter

MessageReporter org.lflang.cli.CliBase.messageReporter
protectedinherited

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

MutuallyExclusive org.lflang.cli.CliBase.topLevelArg
packageinherited

The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/cli/lfd/src/main/java/org/lflang/cli/Lfd.java