StringParserImpl

internal class StringParserImpl<T>(val type: KType, val name: String? = null, val parser: ParserFunction<T>) : StringParser<T>

Constructors

Link copied to clipboard
constructor(type: KType, name: String? = null, parser: ParserFunction<T>)

Properties

Link copied to clipboard
val name: String?
Link copied to clipboard
Link copied to clipboard
open override val type: KType

T, the target type of the parser.

Functions

Link copied to clipboard
open override fun applyOptions(options: ParserOptions?, attemptedParsers: List<KType> = emptyList()): ParserFunction<T>

Applies ParserOptions and optionally supplied previously attemptedParsers to get the actual string parser function that can parse String to T (or null if unsuccessful).

Link copied to clipboard

Applies ParserOptions to get a ParserFunction that can be run in case this StringParser is turned into a converter (like at Parsers.getAsConverterOrNull).

Link copied to clipboard
open override fun toString(): String