mainargs
package mainargs
- Alphabetic
- Public
- Protected
Type Members
- sealed trait ArgReader[T] extends AnyRef
- sealed trait ArgSig[T, B] extends AnyRef
- case class ClassMains[T](main: MainData[T, Any], companion: () => Any) extends Product with Serializable
- 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.
- case class MainData[T, B](name: String, argSigs0: Seq[ArgSig[_, B]], doc: Option[String], invokeRaw: (B, Seq[Any]) => T) extends Product with Serializable
What is known about a single endpoint for our routes.
What is known about a single endpoint for our routes. It has a name, argSigs 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 SubParser[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.
- trait SubParser[T] extends AnyRef
- case class TokenGrouping[B](remaining: List[String], grouped: Map[Named[_, B], Seq[String]]) extends Product with Serializable
- class TokensReader[T] extends AnyRef
- class arg extends Annotation with ClassfileAnnotation
- class main extends Annotation with ClassfileAnnotation
Value Members
- object ArgReader
- object ArgSig
- object Invoker
- object MainData extends Serializable
- object ParamResult
- object ParserForClass
- object ParserForMethods
- object Renderer
- object Result
- object TokenGrouping extends Serializable
- object TokensReader
- object Util