property library

🍃 JetLeaf Property System

This library provides the core infrastructure for resolving and managing configuration values within the JetLeaf Framework.

It exposes the property resolution pipeline, property sources, and annotations used to bind configuration into application components.

🔍 What This Library Does

  • Resolves configuration values from multiple sources
  • Normalizes and queries hierarchical properties
  • Allows custom property sources to be registered
  • Supports strongly-typed configuration binding

📦 Exports Overview

🧩 Property Resolution

  • PropertyResolver — contract for resolving property values
  • AbstractPropertyResolver — base implementation with shared logic
  • PropertySourcesPropertyResolver — resolver backed by multiple sources

🏗 Property Sources

  • _PropertySource — internal base representation
  • PropertySource — public abstraction of a configuration source

Examples of property sources may include:

  • environment variables
  • system properties
  • configuration files
  • in-memory definitions

🔒 Configuration Binding

  • ConfigurationProperties — annotation for binding structured config
  • JetLeafProperty — metadata for defining individual config fields

Used to map external configuration into typed classes, similar to:

@ConfigurationProperties(prefix: 'server')
class ServerConfig {
  final int port;

  const ServerConfig({required this.port});
}

✅ Intended Usage

Importing this library grants access to the JetLeaf configuration system:

import 'package:jetleaf_env/property.dart';

final value = resolver.getProperty('app.name');

Typically, applications will not implement resolvers directly— instead, JetLeaf assembles them through the environment layer.

Classes

AbstractPropertyResolver
An abstract base implementation of ConfigurablePropertyResolver that provides common functionality for resolving property placeholders, type conversion, and required property validation.
AlphabeticalRule
A property source ordering rule that sorts sources alphabetically by name.
ApplicationConfigurationProperties
ConfigurationProperties is a class for defining application configuration in a typed and expressive way, similar to defining settings in application.yaml, but directly in Dart.
ApplicationConfigurationProperty
A base class for defining structured and strongly typed configuration classes in the JetLeaf framework.
BeforeRule
Represents a reordering rule for property sources that ensures one source appears before another within a list of PropertySources.
CommandLinePropertySource<T>
A base class for property sources that are backed by command line arguments.
ComparatorRule
A property source ordering rule that sorts sources using a custom OrderComparator.
CompositePropertySource
A composite implementation of ListablePropertySource that aggregates multiple PropertySource instances.
ConfigurablePropertyResolver
A specialized PropertyResolver that allows full control over property placeholder behavior and type conversion logic using a configurable ConfigurableConversionService.
JetProperty
Base class for all Jet framework configuration properties.
ListablePropertySource<T>
A specialized PropertySource capable of enumerating all available property keys, allowing efficient lookup operations.
MapPropertySource
A PropertySource implementation backed by a Map of key-value pairs.
MutablePropertySources
A mutable container for managing an ordered list of PropertySource objects.
PriorityRule
A reordering rule for property sources based on explicit numeric priorities.
PropertyResolver
A service abstraction for resolving application properties and configuration values.
PropertySource<T>
A base abstraction representing a source of key-value properties, such as maps, environment variables, or configuration files.
PropertySourceOrderRule
Defines a user-supplied rule that determines the ordering of `PropertySource` objects within JetLeaf’s configuration system.
PropertySources
A collection of PropertySources that provides lookup and stream support.
PropertySourcesPropertyResolver
A concrete implementation of AbstractPropertyResolver that retrieves property values from a collection of PropertySources managed by a MutablePropertySources container.
SimpleCommandLinePropertySource
A CommandLinePropertySource that adapts CommandLineArgs into a resolvable PropertySource.
SystemEnvironmentPropertySource
A MapPropertySource that exposes system environment variables as a property source.

Properties

environmentLoggingListener → Obs<Map<LogLevel, String>>
A reactive listener that holds environment-specific logging configuration.
final