SimpleConversionService constructor
SimpleConversionService([
- ProtectionDomain? pd
Creates a new SimpleConversionService.
Parameters:
pd
: Optional protection domain for security (defaults to current)
Example:
// Basic instantiation
final service = SimpleConversionService();
// With custom protection domain
final secureService = SimpleConversionService(myProtectionDomain);
A comprehensive type conversion service that handles conversion between different types.
This service provides:
- Registration of converters and converter factories
- Type conversion with null safety
- Caching for improved performance
- Support for primitive type conversions
- Optional type handling
{@template conversion_service_features}
Key Features
- Converter registration and management
- Type hierarchy-aware conversion
- Null safety and primitive type handling
- Converter caching for performance
- Optional type support
Implementation
SimpleConversionService([ProtectionDomain? pd]) : _pd = pd ?? ProtectionDomain.system() {
_nullConverters.add(_DefaultNullConverter());
}