PrimitiveTypesReader

An EnvReader that reads primitive types and their boxed equivalents from a raw string source.

This class uses a Function to read the raw string value of an environment variable and then parses it into the target type.

Constructors

Link copied to clipboard
constructor(rawReader: (String) -> String)
Creates a new PrimitiveTypesReader with the given raw string reader.

Functions

Link copied to clipboard
open fun <T> read(key: String, targetType: Class<T>): Optional<T>
Reads an environment variable and converts it to the specified type.