- package command
- trait App extends ClosableOnce with CloseOnceAwaitably with Lifecycle
A composable application trait that includes flag parsing as well as basic application lifecycle (pre- and post- main).
- final class CloseException extends Exception with NoStackTrace
An exception that represents collected errors which occurred on close of the app.
When execution of the,
App#nonExitingMainthrows a CloseException, the app will not attempt to call
App#close()again in the
App#exitOnError(t: Throwable)function since this Exception is assumed be a result of already calling
Collected exceptions which occurred during closing are added as "suppressed" exceptions.
- See also
- class Flag[T] extends AnyRef
A single command-line flag, instantiated by a com.twitter.app.Flags instance.
- case class FlagParseException(message: String, cause: Throwable = null) extends Exception with Product with Serializable
Exception thrown upon flag-parsing failure.
A string name of the flag for which parsing failed.
java.lang.Throwablethat caused this exception.
- class FlagUndefinedException extends Exception
- case class FlagUsageError(usage: String) extends Exception with Product with Serializable
- class FlagValueRequiredException extends Exception
- abstract class Flaggable[T] extends AnyRef
A type class providing evidence for parsing type
Tas a flag value.
- final class Flags extends AnyRef
A simple flags implementation.
- abstract class GlobalFlag[T] extends Flag[T]
Subclasses of GlobalFlag (that are defined in libraries) are "global" in the sense that they are accessible by any application that depends on that library.
- trait GlobalFlagVisible extends Annotation
- @Retention() @Inherited()
- abstract class JavaGlobalFlag[T] extends GlobalFlag[T]
In order to declare a new GlobalFlag in Java, it can be done with a bit of ceremony by following a few steps: