- All Implemented Interfaces:
- ConfigParser
ConfigParser implementation that supports following media types:
 MediaTypes.APPLICATION_HOCON and
 MediaTypes.APPLICATION_JSON.
 
 The parser implementation supports ServiceLoader, i.e. Config.Builder
 can automatically load and register HoconConfigParser instance,
 if not disabled.
 And of course it can be registered programmatically.
 
 Priority of the HoconConfigParser to be used by Config.Builder,
 if loaded automatically as a service, is 90.0.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.helidon.config.spi.ConfigParserConfigParser.Content
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final doublePriority of the parser used if registered byConfig.Builderautomatically.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic HoconConfigParserBuilderbuilder()Create a new fluent API builder for a HOCON config parser.static HoconConfigParsercreate()Create a new instance of HOCON config parser using default configuration.parse(ConfigParser.Content content) Parses a specifiedConfigContentinto ahierarchical configuration representation.parse(ConfigParser.Content content, Function<String, Optional<InputStream>> relativeResolver) Parses a specifiedConfigContentinto ahierarchical configuration representation.Returns set of supported media types by the parser.Config parser can define supported file suffixes.
- 
Field Details- 
WEIGHTpublic static final double WEIGHTPriority of the parser used if registered byConfig.Builderautomatically.- See Also:
 
 
- 
- 
Constructor Details- 
HoconConfigParserDeprecated.To be used by Java Service Loader only!!!
 
- 
- 
Method Details- 
createCreate a new instance of HOCON config parser using default configuration.- Returns:
- a new instance of parser
- See Also:
 
- 
builderCreate a new fluent API builder for a HOCON config parser.- Returns:
- a new builder instance
 
- 
supportedMediaTypesDescription copied from interface:ConfigParserReturns 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. ParsableSourceimplementations can useMediaTypesto probe for media type of content to provide it to config system throughConfigParser.Content.Builder.mediaType(io.helidon.common.media.type.MediaType).- Specified by:
- supportedMediaTypesin interface- ConfigParser
- Returns:
- supported media types by the parser
 
- 
parseDescription copied from interface:ConfigParserParses a specifiedConfigContentinto ahierarchical configuration representation.Never returns null.- Specified by:
- parsein interface- ConfigParser
- Parameters:
- content- a content to be parsed
- Returns:
- parsed hierarchical configuration representation
 
- 
parsepublic ConfigNode.ObjectNode parse(ConfigParser.Content content, Function<String, Optional<InputStream>> relativeResolver) Description copied from interface:ConfigParserParses a specifiedConfigContentinto ahierarchical configuration representation.Never returns null.- Specified by:
- parsein interface- ConfigParser
- Parameters:
- content- a content to be parsed
- relativeResolver- function to resolve relative resources to this resource (if supported by the source)
- Returns:
- parsed hierarchical configuration representation
 
- 
supportedSuffixesDescription copied from interface:ConfigParserConfig parser can define supported file suffixes. If such are defined, Helidon will use these to discover default configuration sources. For example if there is aConfigParserthat returnsxml, config would look formeta-config.xmlto discover meta configuration, and forapplication.xmlon file system and on classpath to discover configuration files.Note that the suffixes must resolve into a media type supported by a config parser (see MediaTypes.detectExtensionType(String)).- Specified by:
- supportedSuffixesin interface- ConfigParser
- Returns:
- a set of file suffixes supported by this config parser.
 
 
- 
builder()to construct a customized instance, orcreate()to get an instance with defaults