OptionParser

interface OptionParser

A parser for Options.

All functions should be pure, since the same command instance can parse arguments multiple times.

Types

Link copied to clipboard
data class Invocation(val name: String, val values: List<String>)

The input from a single instance of an option input.

Link copied to clipboard
data class ParseResult(val consumedCount: Int, val invocation: OptionParser.Invocation)

Functions

Link copied to clipboard
abstract fun parseLongOpt(option: Option, name: String, argv: List<String>, index: Int, explicitValue: String?): OptionParser.ParseResult

Parse a single long option and its value.

Link copied to clipboard
abstract fun parseShortOpt(option: Option, name: String, argv: List<String>, index: Int, optionIndex: Int): OptionParser.ParseResult

Parse a single short option and its value.

Inheritors

Link copied to clipboard
Link copied to clipboard