T - the target type to be produced by this Mapperpublic class INIToObjectMapper<T> extends AbstractINIMapper<T> implements Mapper<T>
Mapper that loads the contents of a valid INI Source
(e.g.: file, URL) into a POJO (Plain-Old Java Object).
Every property and section will be assigned to a field in the target object in either of the following cases:
@Property annotation, defining a
custom key to be mapped; orNotes:
private (recommended)transient are ignorednull for object types, zero for numeric types,
and false for booleans.| Constructor and Description |
|---|
INIToObjectMapper(Class<T> targetType)
Builds a new
INIToObjectMapper with the specified target type. |
| Modifier and Type | Method and Description |
|---|---|
T |
apply(InputStream inputStream)
Applies this
Mapper into the given input. |
ConfigurationHelper<T> |
configurationHelper(T object)
Creates a new
ConfigurationHelper instance recommended by this Mapper. |
public T apply(InputStream inputStream) throws IOException
MapperMapper into the given input.
Note: The input stream must be closed by the caller after the mapping operation.
apply in interface Mapper<T>inputStream - the input stream to be mappedIOException - if a low-level I/O problem (such and unexpected end-of-input, or
network error) occurspublic ConfigurationHelper<T> configurationHelper(T object)
MapperConfigurationHelper instance recommended by this Mapper.configurationHelper in interface Mapper<T>object - the configuration object to be used by the helperConfigurationHelper instanceCopyright © 2023. All rights reserved.