org.refcodes.mixin.FilenameExtensionsAccessor
ResourcePropertiesFactory.ResourcePropertiesBuilderFactory
JavaProperties.JavaPropertiesFactory
, JavaPropertiesBuilder.JavaPropertiesBuilderFactory
, JsonProperties.JsonPropertiesFactory
, JsonPropertiesBuilder.JsonPropertiesBuilderFactory
, PolyglotProperties.PolyglotPropertiesFactory
, PolyglotPropertiesBuilder.PolyglotPropertiesBuilderFactory
, TomlProperties.TomlPropertiesFactory
, TomlPropertiesBuilder.TomlPropertiesBuilderFactory
, XmlProperties.XmlPropertiesFactory
, XmlPropertiesBuilder.XmlPropertiesBuilderFactory
, YamlProperties.YamlPropertiesFactory
, YamlPropertiesBuilder.YamlPropertiesBuilderFactory
public interface ResourcePropertiesFactory
extends org.refcodes.mixin.FilenameExtensionsAccessor
ResourceProperties
instances.Modifier and Type | Interface | Description |
---|---|---|
static interface |
ResourcePropertiesFactory.ResourcePropertiesBuilderFactory |
Factory interface for creating
ResourceProperties.ResourcePropertiesBuilder
instances. |
org.refcodes.mixin.FilenameExtensionsAccessor.FilenameExtensionsBuilder<B extends org.refcodes.mixin.FilenameExtensionsAccessor.FilenameExtensionsBuilder<B>>, org.refcodes.mixin.FilenameExtensionsAccessor.FilenameExtensionsMutator, org.refcodes.mixin.FilenameExtensionsAccessor.FilenameExtensionsProperty
Modifier and Type | Method | Description |
---|---|---|
default ResourceProperties |
toProperties(File aFile) |
Loads the properties from the given
File . |
default ResourceProperties |
toProperties(File aFile,
char... aDelimiters) |
Loads the properties from the given
File . |
default ResourceProperties |
toProperties(File aFile,
org.refcodes.runtime.ConfigLocator aConfigLocator) |
Loads or seeks the properties from the given
File . |
ResourceProperties |
toProperties(File aFile,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
Loads or seeks the properties from the given
File . |
default ResourceProperties |
toProperties(InputStream aInputStream) |
Reads the properties from the given
InputStream . |
ResourceProperties |
toProperties(InputStream aInputStream,
char... aDelimiters) |
Reads the properties from the given
InputStream . |
default ResourceProperties |
toProperties(Class<?> aResourceClass,
String aFilePath) |
Loads the properties from the given file's path.
|
default ResourceProperties |
toProperties(Class<?> aResourceClass,
String aFilePath,
char... aDelimiters) |
Loads the properties from the given file's path.
|
default ResourceProperties |
toProperties(Class<?> aResourceClass,
String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator) |
Loads the properties from the given file's path.
|
ResourceProperties |
toProperties(Class<?> aResourceClass,
String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
Loads the properties from the given file's path.
|
ResourceProperties |
toProperties(Object aObj) |
Create a
ResourceProperties instance containing the elements as
of PathMap.MutablePathMap.insert(Object) using the path delimiter "/"
(Delimiter.PATH ) for the path declarations: "Inspects the given
object and adds all elements found in the given object. |
default ResourceProperties |
toProperties(String aFilePath) |
Loads the properties from the given file's path.
|
default ResourceProperties |
toProperties(String aFilePath,
char... aDelimiters) |
Loads the properties from the given file's path.
|
default ResourceProperties |
toProperties(String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator) |
Loads the properties from the given file's path.
|
ResourceProperties |
toProperties(String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
Loads the properties from the given file's path.
|
default ResourceProperties |
toProperties(URL aUrl) |
Loads the properties from the given
URL . |
ResourceProperties |
toProperties(URL aUrl,
char... aDelimiters) |
Loads the properties from the given
URL . |
ResourceProperties |
toProperties(Map<?,?> aProperties) |
Create a
ResourceProperties instance containing the elements of
the provided Map instance using the path delimiter "/"
(Delimiter.PATH ) for the path declarations |
ResourceProperties |
toProperties(Properties aProperties) |
Create a
ResourceProperties instance containing the elements of
the provided Properties instance using the path delimiter "/"
(Delimiter.PATH ) for the path declarations |
ResourceProperties |
toProperties(Properties.PropertiesBuilder aProperties) |
Create a
ResourceProperties instance containing the elements of
the provided Properties.PropertiesBuilder instance using the default path
delimiter "/" (Delimiter.PATH ) for the path declarations |
ResourceProperties toProperties(Class<?> aResourceClass, String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
ConfigLocator
describes the locations to additional crawl for the
desired file. Finally (if nothing else succeeds) the properties are
loaded by the provided class's class loader which takes care of loading
the properties (in case the file path is a relative path, also the
absolute path with a prefixed path delimiter "/" is probed).aResourceClass
- The class which's class loader is to take care of
loading the properties (from inside a JAR).aFilePath
- The file path of the class's resources from which to
load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.aDelimiters
- The path delimiters to be used when parsing the
source's properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.ResourceProperties toProperties(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
File
. A provided
ConfigLocator
describes the locations to additional crawl for the
desired file.aFile
- The File
from which to load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.aDelimiters
- The path delimiters to be used when parsing the
source's properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.ResourceProperties toProperties(InputStream aInputStream, char... aDelimiters) throws IOException, ParseException
InputStream
.aInputStream
- The InputStream
from which to read the
properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.ResourceProperties toProperties(Map<?,?> aProperties)
ResourceProperties
instance containing the elements of
the provided Map
instance using the path delimiter "/"
(Delimiter.PATH
) for the path declarationsaProperties
- the properties to be added.ResourceProperties
.ResourceProperties toProperties(Object aObj)
ResourceProperties
instance containing the elements as
of PathMap.MutablePathMap.insert(Object)
using the path delimiter "/"
(Delimiter.PATH
) for the path declarations: "Inspects the given
object and adds all elements found in the given object. Elements of type
Map
, Collection
and arrays are identified and handled as
of their type: The path for each value in a Map
is appended with
its according key. The path for each value in a Collection
or
array is appended with its according index of occurrence (in case of a
List
or an array, its actual index). In case of reflection, the
path for each member is appended with its according mamber's name. All
elements (e.g. the members and values) are inspected recursively which
results in the according paths of the terminating values."aObj
- The object from which the elements are to be added.ResourceProperties
.ResourceProperties toProperties(Properties aProperties)
ResourceProperties
instance containing the elements of
the provided Properties
instance using the path delimiter "/"
(Delimiter.PATH
) for the path declarationsaProperties
- the properties to be added.ResourceProperties
.ResourceProperties toProperties(Properties.PropertiesBuilder aProperties)
ResourceProperties
instance containing the elements of
the provided Properties.PropertiesBuilder
instance using the default path
delimiter "/" (Delimiter.PATH
) for the path declarationsaProperties
- the properties to be added.ResourceProperties
.ResourceProperties toProperties(String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
ConfigLocator
describes the locations to additional crawl for the
desired file.aFilePath
- The path to the file from which to load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.aDelimiters
- The path delimiters to be used when parsing the
source's properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.ResourceProperties toProperties(URL aUrl, char... aDelimiters) throws IOException, ParseException
URL
.aUrl
- The URL
from which to read the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(Class<?> aResourceClass, String aFilePath) throws IOException, ParseException
aResourceClass
- The class which's class loader is to take care of
loading the properties (from inside a JAR).aFilePath
- The file path of the class's resources from which to
load the properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(Class<?> aResourceClass, String aFilePath, char... aDelimiters) throws IOException, ParseException
aResourceClass
- The class which's class loader is to take care of
loading the properties (from inside a JAR).aFilePath
- The file path of the class's resources from which to
load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(Class<?> aResourceClass, String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator) throws IOException, ParseException
ConfigLocator
describes the locations to additional crawl for the
desired file. Finally (if nothing else succeeds) the properties are
loaded by the provided class's class loader which takes care of loading
the properties (in case the file path is a relative path, also the
absolute path with a prefixed path delimiter "/" is probed).aResourceClass
- The class which's class loader is to take care of
loading the properties (from inside a JAR).aFilePath
- The file path of the class's resources from which to
load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(File aFile) throws IOException, ParseException
File
.aFile
- The File
from which to load the properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(File aFile, char... aDelimiters) throws IOException, ParseException
File
.aFile
- The File
from which to load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator) throws IOException, ParseException
File
. A provided
ConfigLocator
describes the locations to additional crawl for the
desired file.aFile
- The File
from which to load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(InputStream aInputStream) throws IOException, ParseException
InputStream
.aInputStream
- The InputStream
from which to read the
properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(String aFilePath) throws IOException, ParseException
aFilePath
- The path to the file from which to load the properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(String aFilePath, char... aDelimiters) throws IOException, ParseException
aFilePath
- The path to the file from which to load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator) throws IOException, ParseException
ConfigLocator
describes the locations to additional crawl for the
desired file.aFilePath
- The path to the file from which to load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default ResourceProperties toProperties(URL aUrl) throws IOException, ParseException
URL
.aUrl
- The URL
from which to read the properties.ResourceProperties
.IOException
- thrown in case accessing or processing the properties
file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.Copyright © 2021. All rights reserved.