- java.lang.Object
-
- io.helidon.config.yaml.YamlConfigParser
-
- All Implemented Interfaces:
ConfigParser
@Priority(200) public class YamlConfigParser extends Object implements ConfigParser
YAMLConfigParserimplementation that supports "application/x-yaml".The parser implementation supports
ServiceLoader, i.e.Config.Buildercan automatically load and registerYamlConfigParserinstance, if notdisabled. And of course it can beregistered programmatically.Priority of the
YamlConfigParserto be used byConfig.Builder, if loaded automatically as aservice, is 200.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.helidon.config.spi.ConfigParser
ConfigParser.Content
-
-
Field Summary
Fields Modifier and Type Field Description static StringMEDIA_TYPE_APPLICATION_YAMLA String constant representing "application/x-yaml" media type.static intPRIORITYPriority of the parser used if registered byConfig.Builderautomatically.
-
Constructor Summary
Constructors Constructor Description YamlConfigParser()Deprecated.This method should not be directly used, usecreate()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static YamlConfigParsercreate()Create a new YAML Config Parser.ConfigNode.ObjectNodeparse(ConfigParser.Content content)Set<String>supportedMediaTypes()List<String>supportedSuffixes()-
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
-
-
-
-
Field Detail
-
MEDIA_TYPE_APPLICATION_YAML
public static final String MEDIA_TYPE_APPLICATION_YAML
A String constant representing "application/x-yaml" media type.- See Also:
- Constant Field Values
-
PRIORITY
public static final int PRIORITY
Priority of the parser used if registered byConfig.Builderautomatically.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
YamlConfigParser
@Deprecated public YamlConfigParser()
Deprecated.This method should not be directly used, usecreate()Default constructor needed by Java Service loader.
-
-
Method Detail
-
create
public static YamlConfigParser create()
Create a new YAML Config Parser.- Returns:
- a new instance of parser for YAML
-
supportedMediaTypes
public Set<String> supportedMediaTypes()
- Specified by:
supportedMediaTypesin interfaceConfigParser
-
supportedSuffixes
public List<String> supportedSuffixes()
- Specified by:
supportedSuffixesin interfaceConfigParser
-
parse
public ConfigNode.ObjectNode parse(ConfigParser.Content content) throws ConfigParserException
- Specified by:
parsein interfaceConfigParser- Throws:
ConfigParserException
-
-