mainargs
package mainargs
- Alphabetic
- Public
- All
Type Members
-
class
ArgSig extends Product with Serializable with Equals
Models what is known by the router about a single argument: that it has a longName, a human-readable typeString describing what the type is (just for logging and reading, not a replacement for a
TypeTag
) and possible a function that can compute its default value - case class Flag(value: Boolean = false) extends Product with Serializable
- case class Leftover[T](value: T*) extends Product with Serializable
-
class
Macros extends AnyRef
More or less a minimal version of Autowire's Server that lets you generate a set of "routes" from the methods defined in an object, and call them using passing in name/args/kwargs via Java reflection, without having to generate/compile code or use Scala reflection.
More or less a minimal version of Autowire's Server that lets you generate a set of "routes" from the methods defined in an object, and call them using passing in name/args/kwargs via Java reflection, without having to generate/compile code or use Scala reflection. This saves us spinning up the Scala compiler and greatly reduces the startup time of cached scripts.
-
class
MainData[T, B] extends Product with Serializable with Equals
What is known about a single endpoint for our routes.
What is known about a single endpoint for our routes. It has a name, flattenedArgSigs for each argument, and a macro-generated invoke0 that performs all the necessary argument parsing and de-serialization.
Realistically, you will probably spend most of your time calling Invoker.invoke instead, which provides a nicer API to call it that mimmicks the API of calling a Scala method.
- case class MethodMains[B](value: Seq[MainData[Any, B]], base: () ⇒ B) extends Product with Serializable
- sealed trait ParamResult[+T] extends AnyRef
- class ParserForClass[T] extends Class[T]
- class ParserForMethods[B] extends AnyRef
-
sealed
trait
Result[+T] extends AnyRef
Represents what comes out of an attempt to invoke an Main.
Represents what comes out of an attempt to invoke an Main. Could succeed with a value, but could fail in many different ways.
- case class TokenGrouping[B](remaining: List[String], grouped: Map[ArgSig, Seq[String]]) extends Product with Serializable
-
sealed
trait
TokensReader[T] extends AnyRef
Represents the ability to parse CLI input arguments into a type T
- class arg extends Annotation with ClassfileAnnotation
- class main extends Annotation with ClassfileAnnotation
Value Members
- object ArgSig extends Serializable
- object Compat
- object Invoker
- object MainData extends Serializable
- object ParamResult
- object ParserForClass extends ParserForClassCompanionVersionSpecific
- object ParserForMethods extends ParserForMethodsCompanionVersionSpecific
- object Renderer
- object Result
- object TokenGrouping extends Serializable
- object TokensReader
- object Util