Skip to content

clikt / com.github.ajalt.clikt.parsers / OptionParser

OptionParser

interface OptionParser

A parser for Options.

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

Types

Name Summary
Invocation The input from a single instance of an option input.data class Invocation
ParseResult data class ParseResult

Functions

Name Summary
parseLongOpt Parse a single long option and its value.abstract fun parseLongOpt(option:Option, name:String, argv:List<String>, index:Int, explicitValue:String?): ParseResult
parseShortOpt Parse a single short option and its value.abstract fun parseShortOpt(option:Option, name:String, argv:List<String>, index:Int, optionIndex:Int): ParseResult

Inheritors

Name Summary
FlagOptionParser A parser for options that take no values.object FlagOptionParser :OptionParser
OptionWithValuesParser An option that takes one more valuesobject OptionWithValuesParser :OptionParser