Interface ConfigSource
- All Known Implementing Classes:
JsonConfigSource,ListBackedConfigSource,MapBackedConfigSource,ParamsParserSource
public interface ConfigSource
A Config Source knows how to read a block of data and convert it
into a stream of zero or more configuration elements.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTest the input data format to see if it appears valid for reading with this config source.Read the source of data into a collection of config elementsgetName()If an element was created with a name, this name must be returned as the canonical name.
-
Method Details
-
canRead
Test the input data format to see if it appears valid for reading with this config source.- Parameters:
source- An object of any kind- Returns:
- true if the text is parsable by this config source
-
getAll
Read the source of data into a collection of config elements- Parameters:
source- An object of any kind- Returns:
- a collection of
Elements
-
getName
String getName()If an element was created with a name, this name must be returned as the canonical name. If it was not, then the name field can provide the name.- Returns:
- A name, or null if it is not given nor present in the name field
-