Interface ConversionContext
- All Known Implementing Classes:
ConverterRegistry.Context
public interface ConversionContext
Immutable conversion location, with recursive dispatch through the same module registry.
Paths are whole keys: a key containing a dot is never split.
- Since:
- 6.3.0
-
Method Summary
-
Method Details
-
file
String file()- Returns:
- the configuration file's module-relative name
-
path
- Returns:
- an immutable list of whole path segments
-
declaredType
Type declaredType()- Returns:
- the declared Java type, including generic arguments
-
toPlain
Converts a nested Java value using its runtime type and the same registry.- Parameters:
nested- the nested Java value- Returns:
- plain data
- Throws:
ConversionException- when conversion fails
-
fromPlain
Converts a nested document value through the same registry.- Type Parameters:
V- the result type- Parameters:
nested- the nested document valuetype- the declared nested Java type- Returns:
- the converted nested value
- Throws:
ConversionException- when conversion fails
-