Object

com.fulcrumgenomics.sopt

Sopt

Related Doc: package sopt

Permalink

object Sopt

Facade into Sopt that allows for both parsing of command lines to generate command objects and also inspection of command classes.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Sopt
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Arg(name: String, group: Option[String], flag: Option[Char], kind: String, minValues: Int, maxValues: Int, defaultValues: Seq[String], sensitive: Boolean, description: String) extends MarkDownDescription with Product with Serializable

    Permalink

    Represents information about an argument to a command line program.

    Represents information about an argument to a command line program.

    name

    the name of the argument as presented on the command line

    group

    the (optional) name of the group in which the argument exists

    flag

    the optional flag character for the argument if it has one

    kind

    the name of the type of the argument (for collection arguments, the type in the collection)

    minValues

    the minimum number of values that must be specified

    maxValues

    the maximum number of values that may be specified

    defaultValues

    the seq of default values, as strings

    sensitive

    if true the argument is sensitive and values should not be re-displayed

    description

    the description of the argument

  2. case class ClpMetadata(name: String, group: Group, hidden: Boolean, description: String, args: Seq[Arg]) extends MarkDownDescription with Product with Serializable

    Permalink

    Represents the metadata about a command line program that may be consumed externally to generate documentation etc.

    Represents the metadata about a command line program that may be consumed externally to generate documentation etc.

    name

    the name of the program / command

    group

    the clp group name of the program

    hidden

    whether or not the program is marked as hidden

    description

    the description/documentation for the program in MarkDown format

    args

    the ordered Seq of arguments the program takes

  3. case class CommandSuccess[A](command: A) extends Result[A, Nothing] with Product with Serializable

    Permalink

    The result type when a single command is successfully parsed.

  4. case class Failure(usage: () ⇒ String) extends Result[Nothing, Nothing] with Product with Serializable

    Permalink

    The result type when a parsing failure occurrs.

  5. case class Group(name: String, description: String, rank: Int) extends ClpGroup with Product with Serializable

    Permalink

    Represents the group to which command line programs belong.

  6. trait MarkDownDescription extends AnyRef

    Permalink
    Attributes
    protected
  7. sealed trait Result[Command, Subcommand] extends AnyRef

    Permalink

    Trait representing the results of trying to parse commands, and sub-commands, in sopt.

  8. case class SubcommandSuccess[A, B](command: A, subcommand: B) extends Result[A, B] with Product with Serializable

    Permalink

    The result type when a command/sub-command pair are successfully parsed.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val TerminalWidth: Int

    Permalink

    The assumed width of the terminal.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def find[A](packages: Traversable[String], includeHidden: Boolean = false)(implicit arg0: ClassTag[A], arg1: scala.reflect.api.JavaUniverse.TypeTag[A]): Seq[Class[_ <: A]]

    Permalink

    Finds classes that extend the given type within the specified packages.

    Finds classes that extend the given type within the specified packages.

    A

    the type of the commands to find

    packages

    one or more fully qualified packages (e.g. com.fulcrumgenomics.sopt')

    includeHidden

    whether or not to include programs marked as hidden

    returns

    the resulting set of command classes

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. def inspect[A](clp: Class[A]): ClpMetadata

    Permalink

    Inspect a command class that is annotated with clp and arg annotations.

    Inspect a command class that is annotated with clp and arg annotations.

    A

    the type of the class

    clp

    the class to be inspected

    returns

    a metadata object containing information about the command and it's arguments

  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def parseCommand[Command](name: String, args: Seq[String], commands: Traversable[Class[_ <: Command]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[Command], arg1: ClassTag[Command]): Result[_ <: Command, Nothing]

    Permalink

    Parses a command line for a single command.

    Parses a command line for a single command. Expects that the command name is the first value in the arguments, and that the remainder are arguments to the command.

    Command

    the parent type of all command classes

    name

    the name of the toolkit, to be printed in usage statements

    args

    the ordered sequence of arguments from the command line

    commands

    the set of possible command classes to select from

    returns

    the result of parsing the command

  19. def parseCommandAndSubCommand[Command, SubCommand](name: String, args: Seq[String], subcommands: Traversable[Class[_ <: SubCommand]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[Command], arg1: ClassTag[Command], arg2: scala.reflect.api.JavaUniverse.TypeTag[SubCommand], arg3: ClassTag[SubCommand]): Result[_ <: Command, _ <: SubCommand]

    Permalink

    Parses a command line for a command/sub-command pair.

    Parses a command line for a command/sub-command pair. The arguments should contain, in order, any arguments to the primary command, the name of the sub-command, and then the arguments to the sub-command.

    Command

    the type of the command class

    SubCommand

    the parent type of all the subcommands

    name

    the name of the toolkit, to be printed in usage statements

    args

    the ordered sequence of arguments from the command line

    subcommands

    the set of possible subcommand classes to select from

    returns

    the result of parsing the command

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped