TranslationCommand

com.reactific.riddl.commands.TranslationCommand
See theTranslationCommand companion object
abstract class TranslationCommand[OPT <: Options](name: String)(implicit evidence$1: ClassTag[OPT]) extends PassCommand[OPT]

An abstract base class for translation style commands. That is, they translate an input file into an output directory of files.

Type parameters

OPT

The option type for the command

Value parameters

name

The name of the command to pass to CommandPlugin

Attributes

Companion
object
Graph
Supertypes
class PassCommand[OPT]
class CommandPlugin[OPT]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type OptionPlacer[V] = (V, OPT) => OPT

Attributes

Inherited from:
CommandPlugin

Value members

Inherited methods

def getConfigReader: ConfigReader[OPT]

Provide a typesafe/Config reader for the commands options.

Provide a typesafe/Config reader for the commands options. This reader should read an object having the same name as the command. The fields of that object must correspond to the fields of the OPT type.

Attributes

Returns

A pureconfig.ConfigReader[OPT] that knows how to read OPT

Inherited from:
CommandPlugin
def getOptions: (OParser[Unit, OPT], OPT)

Provide an scopt OParser for the commands options type, OPT

Provide an scopt OParser for the commands options type, OPT

Attributes

Returns

A pair: the OParser and the default values for OPT

Inherited from:
CommandPlugin
def getPasses(log: Logger, commonOptions: CommonOptions, options: OPT): PassesCreator

Attributes

Inherited from:
PassCommand
def inputFile(f: () => File): OParser[File, OPT]

Attributes

Inherited from:
CommandPlugin

Attributes

Inherited from:
PluginInterface
def loadOptionsFrom(configFile: Path, commonOptions: CommonOptions): Either[Messages, OPT]

Attributes

Inherited from:
CommandPlugin
def outputDir(f: () => File): OParser[File, OPT]

Attributes

Inherited from:
CommandPlugin
def overrideOptions(options: OPT, newOutputDir: Path): OPT

Attributes

Inherited from:
PassCommand
def parseOptions(args: Array[String]): Option[OPT]

Attributes

Inherited from:
CommandPlugin
final override def pluginVersion: String

Attributes

Definition Classes
Inherited from:
CommandPlugin
def replaceInputFile(options: OPT, inputFile: Path): OPT

Attributes

Inherited from:
CommandPlugin
def resolveInputFileToConfigFile(options: OPT, commonOptions: CommonOptions, configFile: Path): OPT

Attributes

Inherited from:
CommandPlugin

Attributes

Inherited from:
PluginInterface
final override def run(originalOptions: OPT, commonOptions: CommonOptions, log: Logger, outputDirOverride: Option[Path]): Either[Messages, PassesResult]

Execute the command given the options.

Execute the command given the options. Error should be returned as Left(messages) and not directly logged. The log is for verbose or debug output

Value parameters

commonOptions

The options common to all commands

log

A logger for logging errors, warnings, and info

options

The command specific options

Attributes

Returns

Either a set of Messages on error or a Unit on success

Definition Classes
Inherited from:
PassCommand
def run(args: Array[String], commonOptions: CommonOptions, log: Logger, outputDirOverride: Option[Path]): Either[Messages, PassesResult]

Attributes

Inherited from:
CommandPlugin

Inherited fields

Attributes

Inherited from:
CommandPlugin