lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.generator.Validator Class Referenceabstract

Validate generated code. More...

Inherited by org.lflang.generator.python.PythonValidator.

Classes

class  Pair

Public Member Functions

final void doValidate (LFGeneratorContext context) throws ExecutionException, InterruptedException
 Validate this Validator's group of generated files.
final int run (LFCommand command, CancelIndicator cancelIndicator)
 Run the given command, report any messages produced using the reporting strategies given by getBuildReportingStrategies, and return its return code.

Protected Member Functions

abstract Pair< DiagnosticReporting.Strategy, DiagnosticReporting.StrategygetBuildReportingStrategies ()
 Return the appropriate output and error reporting strategies for the main build process.
abstract Collection< ValidationStrategygetPossibleStrategies ()
 List all validation strategies that exist for the implementor without filtering by platform or availability.
boolean validationEnabledByDefault (LFGeneratorContext context)
 Return whether validation of generated code is enabled by default.
 Validator (MessageReporter messageReporter, Map< Path, CodeMap > codeMaps)
 Initialize a Validator that reports errors to errorReporter and adjusts document positions using codeMaps.

Protected Attributes

final ImmutableMap< Path, CodeMapcodeMaps
final MessageReporter messageReporter

Detailed Description

Validate generated code.

Author
Peter Donovan

Constructor & Destructor Documentation

◆ Validator()

org.lflang.generator.Validator.Validator ( MessageReporter messageReporter,
Map< Path, CodeMap > codeMaps )
protected

Initialize a Validator that reports errors to errorReporter and adjusts document positions using codeMaps.

Member Function Documentation

◆ doValidate()

final void org.lflang.generator.Validator.doValidate ( LFGeneratorContext context) throws ExecutionException, InterruptedException

Validate this Validator's group of generated files.

Parameters
contextThe context of the current build.

◆ getBuildReportingStrategies()

abstract Pair< DiagnosticReporting.Strategy, DiagnosticReporting.Strategy > org.lflang.generator.Validator.getBuildReportingStrategies ( )
abstractprotected

Return the appropriate output and error reporting strategies for the main build process.

Reimplemented in org.lflang.generator.python.PythonValidator.

◆ getPossibleStrategies()

abstract Collection< ValidationStrategy > org.lflang.generator.Validator.getPossibleStrategies ( )
abstractprotected

List all validation strategies that exist for the implementor without filtering by platform or availability.

Reimplemented in org.lflang.generator.python.PythonValidator.

◆ run()

final int org.lflang.generator.Validator.run ( LFCommand command,
CancelIndicator cancelIndicator )

Run the given command, report any messages produced using the reporting strategies given by getBuildReportingStrategies, and return its return code.

◆ validationEnabledByDefault()

boolean org.lflang.generator.Validator.validationEnabledByDefault ( LFGeneratorContext context)
protected

Return whether validation of generated code is enabled by default.

Parameters
contextThe context of the current build.
Returns
Whether validation of generated code is enabled by default.

Member Data Documentation

◆ codeMaps

final ImmutableMap<Path, CodeMap> org.lflang.generator.Validator.codeMaps
protected

◆ messageReporter

final MessageReporter org.lflang.generator.Validator.messageReporter
protected

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