abstract class CmdDescriptor extends AnyRef
Base class for all Cmd descriptors (usually companion objects)
- Alphabetic
- By Inheritance
- CmdDescriptor
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new CmdDescriptor(name: String, cmdParamSyntax: String, description: String)
Abstract Value Members
-
abstract
def
parseCmd(ctx: AppContext): Cmd
Creates a new command instance based on the given AppContext
Creates a new command instance based on the given AppContext
- Exceptions thrown
UsageException
when the command cannot be parsed or the usage is not correct
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val BaseDocUrl: String
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val cmdParamSyntax: String
- val description: String
-
def
docUrl: String
Url of the ScalaDoc for this command.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(msg: String): Nothing
Called during command line parsing and instantiation of Cmd for execution.
Called during command line parsing and instantiation of Cmd for execution. This is the prefered method to throw an exception.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def parseNetwork(network: String): NetworkType
-
def
printUsage(console: Console): Console
Outputs the usage help for this command to the given console
- def readNewPassword(prompt: String, secondPrompt: String)(implicit ctx: AppContext): Array[Char]
-
def
readNewPassword(nAttemps: Int, console: Console)(block: ⇒ (Array[Char], Array[Char])): Array[Char]
Secure double entry of the new password giving the user many attempts.
Secure double entry of the new password giving the user many attempts.
- nAttemps
number of attempts before failing with exception
- block
code block which can request the user to enter a new password twice
- returns
password returned by
block
asArray[Char]
instead ofString
. This allows the password to be erased as fast as possible and avoid leaking to GC.
- Exceptions thrown
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
usageError(msg: String): Nothing
Can be used by concrete command descriptors to report usage errors.
Can be used by concrete command descriptors to report usage errors.
- Attributes
- protected
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )