public class PropertiesBuilderParametersImpl extends FileBasedBuilderParametersImpl implements PropertiesBuilderProperties<PropertiesBuilderParametersImpl>
A specialized parameter class for configuring PropertiesConfiguration
instances.
This class allows setting of some properties specific to properties
configuration, e.g. the layout object. By inheriting from
FileBasedBuilderParametersImpl
, basic properties and properties
related to file-based configurations are available, too.
This class is not thread-safe. It is intended that an instance is constructed
and initialized by a single thread during configuration of a
ConfigurationBuilder
.
RESERVED_PARAMETER_PREFIX
Constructor and Description |
---|
PropertiesBuilderParametersImpl() |
Modifier and Type | Method and Description |
---|---|
void |
inheritFrom(Map<String,?> source)
Inherits properties from the specified map.
|
PropertiesBuilderParametersImpl |
setIncludeListener(ConfigurationConsumer<ConfigurationException> includeListener)
Sets the current include listener, may be null.
|
PropertiesBuilderParametersImpl |
setIncludesAllowed(boolean f)
Sets a flag whether include files are supported by the properties
configuration object.
|
PropertiesBuilderParametersImpl |
setIOFactory(PropertiesConfiguration.IOFactory factory)
Sets the
IOFactory to be used by the properties configuration
object. |
PropertiesBuilderParametersImpl |
setLayout(PropertiesConfigurationLayout layout)
Sets the layout object for the properties configuration object.
|
clone, fromMap, fromParameters, fromParameters, getFileHandler, getParameters, getReloadingDetectorFactory, getReloadingRefreshDelay, setBasePath, setEncoding, setFile, setFileName, setFileSystem, setLocationStrategy, setPath, setReloadingDetectorFactory, setReloadingRefreshDelay, setURL
copyPropertiesFrom, fetchBeanHelper, fetchInterpolatorSpecification, fetchProperty, merge, setBeanHelper, setConfigurationDecoder, setConversionHandler, setDefaultLookups, setInterpolator, setListDelimiterHandler, setLogger, setParentInterpolator, setPrefixLookups, setSynchronizer, setThrowExceptionOnMissing, storeProperty
public PropertiesBuilderParametersImpl setIncludeListener(ConfigurationConsumer<ConfigurationException> includeListener)
PropertiesBuilderProperties
setIncludeListener
in interface PropertiesBuilderProperties<PropertiesBuilderParametersImpl>
includeListener
- the current include listener, may be null.public PropertiesBuilderParametersImpl setIncludesAllowed(boolean f)
PropertiesBuilderProperties
setIncludesAllowed
in interface PropertiesBuilderProperties<PropertiesBuilderParametersImpl>
f
- the value of the flagpublic void inheritFrom(Map<String,?> source)
ConfigurationInterpolator
- are tightly connected to a
configuration and cannot be reused in a different context. For other
properties, e.g. a file name, it does not make sense to copy it.
Therefore, an implementation has to be explicit in the properties it
wants to take over. This implementation takes some properties defined in this
class into account. This implementation takes some more properties into account
that are defined in this class.inheritFrom
in class FileBasedBuilderParametersImpl
source
- the source properties to inherit frompublic PropertiesBuilderParametersImpl setLayout(PropertiesConfigurationLayout layout)
PropertiesBuilderProperties
setLayout
in interface PropertiesBuilderProperties<PropertiesBuilderParametersImpl>
layout
- the PropertiesConfigurationLayout
object to be used
by the configurationpublic PropertiesBuilderParametersImpl setIOFactory(PropertiesConfiguration.IOFactory factory)
PropertiesBuilderProperties
IOFactory
to be used by the properties configuration
object. With this method a custom factory for input and output streams
can be set. This allows customizing the format of properties read or
written by the configuration. If no IOFactory
is provided, the
configuration uses a default one.setIOFactory
in interface PropertiesBuilderProperties<PropertiesBuilderParametersImpl>
factory
- the IOFactory
to be used by the configurationCopyright © 2001–2020 The Apache Software Foundation. All rights reserved.