tuweni / org.apache.tuweni.config

Package org.apache.tuweni.config

A general-purpose library for managing configuration data.

These classes are included in the complete Tuweni distribution, or separately when using the gradle dependency org.apache.tuweni:tuweni-config (tuweni-config.jar).

Types

Configuration

interface Configuration

Represents collection of configuration properties, optionally validated against a schema.

ConfigurationErrors

class ConfigurationErrors

Factory methods for collections of ConfigurationError.

ConfigurationValidator

interface ConfigurationValidator

A validator for a configuration.

Validators of this type are invoked during verification after all property validators. However, errors returned by property validators do not prevent this validator being evaluated, so properties of the configuration may be missing or invalid.

DocumentPosition

class DocumentPosition

A position in an input document.

PropertyValidator

interface PropertyValidator<T : Any>

A validator associated with a specific configuration property.

Schema

class Schema

A schema for a configuration, providing default values and validation rules.

SchemaBuilder

class SchemaBuilder

This interface allows customers to determine a schema to associate with a configuration to validate the entries read from configuration files, and provide default values if no value is present in the configuration file.

Exceptions

ConfigurationError

class ConfigurationError : RuntimeException

Provides details regarding an error in the configuration.

InvalidConfigurationPropertyTypeException

class InvalidConfigurationPropertyTypeException : RuntimeException

An exception thrown when an invalid type is encountered.

NoConfigurationPropertyException

class NoConfigurationPropertyException : RuntimeException

An exception thrown when a requested configuration property is not found.

This exception can be avoided by using a schema that provides a default value or asserts that a value has been provided in the configuration.