java.lang.Object
io.helidon.config.PropertiesConfigParser
- All Implemented Interfaces:
ConfigParser
ConfigParser
implementation that parses Java Properties content.
The parser implementation supports ServiceLoader
, i.e. Config.Builder
can automatically load and register PropertiesConfigParser
instance,
if not disabled
.
And of course it can be registered programmatically
.
Priority of the PropertiesConfigParser
to be used by Config.Builder
,
if loaded automatically as a service
, is 200.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.config.spi.ConfigParser
ConfigParser.Content
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A String constant representing "text/x-java-properties" media type.static final int
Priority of the parser used if registered byConfig.Builder
automatically. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionparse
(ConfigParser.Content content) Parses a specifiedConfigContent
into ahierarchical configuration representation
.Returns set of supported media types by the parser.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.config.spi.ConfigParser
parse, supportedSuffixes
-
Field Details
-
MEDIA_TYPE_TEXT_JAVA_PROPERTIES
A String constant representing "text/x-java-properties" media type.- See Also:
-
PRIORITY
public static final int PRIORITYPriority of the parser used if registered byConfig.Builder
automatically.- See Also:
-
-
Constructor Details
-
PropertiesConfigParser
public PropertiesConfigParser()
-
-
Method Details
-
supportedMediaTypes
Description copied from interface:ConfigParser
Returns set of supported media types by the parser.Set of supported media types is used when config system looks for appropriate parser based on media type of content.
ParsableSource
implementations can useMediaTypes
to probe for media type of content to provide it to config system throughConfigParser.Content.Builder.mediaType(String)
.- Specified by:
supportedMediaTypes
in interfaceConfigParser
- Returns:
- supported media types by the parser
-
parse
Description copied from interface:ConfigParser
Parses a specifiedConfigContent
into ahierarchical configuration representation
.Never returns
null
.- Specified by:
parse
in interfaceConfigParser
- Parameters:
content
- a content to be parsed- Returns:
- parsed hierarchical configuration representation
- Throws:
ConfigParserException
- in case of problem to parse configuration from the source
-