public static final class YamlConfigurationOptions.QuoteStyleDefaults extends Object
QuoteStyle
for each type.Modifier and Type | Method and Description |
---|---|
QuoteStyle |
getDefaultQuoteStyle()
Get the default quote style.
|
QuoteStyle |
getQuoteStyle(Class<?> valueClass)
Get the quote style to apply to a specific type.
|
Map<Class<?>,QuoteStyle> |
getQuoteStyles()
Get the overriden quote styles for every specific type set.
|
YamlConfigurationOptions.QuoteStyleDefaults |
setDefaultQuoteStyle(QuoteStyle defaultQuoteStyle)
Set the default quote style.
|
YamlConfigurationOptions.QuoteStyleDefaults |
setQuoteStyle(Class<?> valueClass,
QuoteStyle quoteStyle)
Set the default quote style for a specific type.
|
public QuoteStyle getDefaultQuoteStyle()
public YamlConfigurationOptions.QuoteStyleDefaults setDefaultQuoteStyle(QuoteStyle defaultQuoteStyle)
public YamlConfigurationOptions.QuoteStyleDefaults setQuoteStyle(Class<?> valueClass, QuoteStyle quoteStyle)
This style is applied to values which class is the specified class or is a child of that class.
Example:options.setQuoteStyle(String.class, QuoteStyle.DOUBLE); yamlConfig.set("key", "This string will be set with double quote style");Set quoteStyle to null to set new values again with the default quote style.
valueClass
- the specific class to override default quote stylequoteStyle
- the quote style to applypublic QuoteStyle getQuoteStyle(Class<?> valueClass)
setQuoteStyle(Class, QuoteStyle)
method
then the getDefaultQuoteStyle()
is returned.valueClass
- the type classpublic Map<Class<?>,QuoteStyle> getQuoteStyles()
Copyright © 2023. All rights reserved.