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

The result of a code generation task. More...

Classes

enum  Status
 A Status is a level of completion of a code generation task. More...

Public Member Functions

 GeneratorResult (Status status, LFGeneratorContext context, Map< Path, CodeMap > codeMaps)
 Initialize a GeneratorResult.
Map< Path, CodeMapgetCodeMaps ()
 Return a map from generated sources to their code maps.
LFGeneratorContext getContext ()
Status getStatus ()
 Return the status of this.
String getUserMessage ()
 Return a message that can be relayed to the end user about this GeneratorResult.

Static Public Attributes

static GeneratorResult CANCELLED = incompleteGeneratorResult(Status.CANCELLED)
static GeneratorResult FAILED = incompleteGeneratorResult(Status.FAILED)
static BiFunction< LFGeneratorContext, Map< Path, CodeMap >, GeneratorResultGENERATED_NO_EXECUTABLE
static GeneratorResult NOTHING = incompleteGeneratorResult(Status.NOTHING)

Detailed Description

The result of a code generation task.

Author
Peter Donovan

Constructor & Destructor Documentation

◆ GeneratorResult()

org.lflang.generator.GeneratorResult.GeneratorResult ( Status status,
LFGeneratorContext context,
Map< Path, CodeMap > codeMaps )

Initialize a GeneratorResult.

Parameters
statusThe level of completion of a code generation task.
contextThe context within which the result was produced.
codeMapsA mapping from generated files to their CodeMaps.

Member Function Documentation

◆ getCodeMaps()

Map< Path, CodeMap > org.lflang.generator.GeneratorResult.getCodeMaps ( )

Return a map from generated sources to their code maps.

The completeness of this resulting map is given on a best-effort basis, but those mappings that it does contain are guaranteed to be correct.

Returns
An unmodifiable map from generated sources to their code maps.

◆ getContext()

LFGeneratorContext org.lflang.generator.GeneratorResult.getContext ( )

◆ getStatus()

Status org.lflang.generator.GeneratorResult.getStatus ( )

Return the status of this.

◆ getUserMessage()

String org.lflang.generator.GeneratorResult.getUserMessage ( )

Return a message that can be relayed to the end user about this GeneratorResult.

Member Data Documentation

◆ CANCELLED

GeneratorResult org.lflang.generator.GeneratorResult.CANCELLED = incompleteGeneratorResult(Status.CANCELLED)
static

◆ FAILED

GeneratorResult org.lflang.generator.GeneratorResult.FAILED = incompleteGeneratorResult(Status.FAILED)
static

◆ GENERATED_NO_EXECUTABLE

BiFunction<LFGeneratorContext, Map<Path, CodeMap>, GeneratorResult> org.lflang.generator.GeneratorResult.GENERATED_NO_EXECUTABLE
static
Initial value:
=
(context, codeMaps) -> new GeneratorResult(Status.GENERATED, context, codeMaps)
GeneratorResult(Status status, LFGeneratorContext context, Map< Path, CodeMap > codeMaps)
Initialize a GeneratorResult.
Definition GeneratorResult.java:71
A Status is a level of completion of a code generation task.
Definition GeneratorResult.java:23
GENERATED
Definition GeneratorResult.java:31

◆ NOTHING

GeneratorResult org.lflang.generator.GeneratorResult.NOTHING = incompleteGeneratorResult(Status.NOTHING)
static

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/GeneratorResult.java