abstract class TranslationCommand[OPT <: Options] extends CommandPlugin[OPT]

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

OPT

The option type for the command

Linear Supertypes
CommandPlugin[OPT], PluginInterface, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TranslationCommand
  2. CommandPlugin
  3. PluginInterface
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TranslationCommand(name: String)(implicit arg0: ClassTag[OPT])

    name

    The name of the command to pass to CommandPlugin

Type Members

  1. type OptionPlacer[V] = (V, OPT) => OPT
    Definition Classes
    CommandPlugin

Abstract Value Members

  1. abstract 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.

    returns

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

    Definition Classes
    CommandPlugin
  2. abstract 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

    returns

    A pair: the OParser and the default values for OPT

    Definition Classes
    CommandPlugin
  3. abstract def overrideOptions(options: OPT, newOutputDir: Path): OPT
  4. abstract def translateImpl(validationResult: Result, log: Logger, commonOptions: CommonOptions, options: OPT): Either[Messages, Unit]

    Implement this in your subclass to do the translation.

    Implement this in your subclass to do the translation. The input will have been parsed and validated already so the job is to translate the root argument into the directory of files.

    log

    A Logger to use for messages. Use sparingly, not for errors

    commonOptions

    The options common to all commands

    options

    The options specific to your subclass implementation

    returns

    A Right[Unit] if successful or Left[Messages] if not

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val builder: OParserBuilder[OPT]
    Attributes
    protected
    Definition Classes
    CommandPlugin
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. def inputFile(f: OptionPlacer[File]): OParser[File, OPT]
    Definition Classes
    CommandPlugin
  12. def interfaceVersion: Int
    Definition Classes
    PluginInterface
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def loadOptionsFrom(configFile: Path, commonOptions: CommonOptions = CommonOptions()): Either[Messages, OPT]
    Definition Classes
    CommandPlugin
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. val optionsClass: Class[_]
    Definition Classes
    CommandPlugin
  19. def outputDir(f: OptionPlacer[File]): OParser[File, OPT]
    Definition Classes
    CommandPlugin
  20. def parseOptions(args: Array[String]): Option[OPT]
    Definition Classes
    CommandPlugin
  21. val pluginName: String
    Definition Classes
    CommandPlugin → PluginInterface
  22. final def pluginVersion: String
    Definition Classes
    CommandPlugin → PluginInterface
  23. def replaceInputFile(options: OPT, inputFile: Path): OPT
    Definition Classes
    CommandPlugin
  24. def resolveInputFileToConfigFile(options: OPT, commonOptions: CommonOptions, configFile: Path): OPT
    Definition Classes
    CommandPlugin
  25. def riddlVersion: String
    Definition Classes
    PluginInterface
  26. final def run(originalOptions: OPT, commonOptions: CommonOptions, log: Logger, outputDirOverride: Option[Path]): Either[Messages, Unit]

    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

    commonOptions

    The options common to all commands

    log

    A logger for logging errors, warnings, and info

    returns

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

    Definition Classes
    TranslationCommandCommandPlugin
  27. def run(args: Array[String], commonOptions: CommonOptions, log: Logger, outputDirOverride: Option[Path] = None): Either[Messages, Unit]
    Definition Classes
    CommandPlugin
  28. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from CommandPlugin[OPT]

Inherited from PluginInterface

Inherited from AnyRef

Inherited from Any

Ungrouped