public class YamlConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
YamlConfig.Quote |
static class |
YamlConfig.ReadConfig |
static class |
YamlConfig.WriteClassName |
static class |
YamlConfig.WriteConfig |
| Modifier and Type | Field and Description |
|---|---|
YamlConfig.ReadConfig |
readConfig
Configuration for reading YAML.
|
YamlConfig.WriteConfig |
writeConfig
Configuration for writing YAML.
|
| Constructor and Description |
|---|
YamlConfig() |
| Modifier and Type | Method and Description |
|---|---|
void |
setAllowDuplicates(boolean allowDuplicates)
Allows duplicate keys in YAML document.
|
void |
setBeanProperties(boolean beanProperties)
If true, bean properties with both a getter and setter will be used.
|
void |
setClassTag(String tag,
Class type)
Allows the specified tag to be used in YAML instead of the full class name.
|
void |
setPrivateConstructors(boolean privateConstructors)
If true, private no-arg constructors will be used.
|
void |
setPrivateFields(boolean privateFields)
If true, private non-transient fields will be used.
|
void |
setPropertyDefaultType(Class type,
String propertyName,
Class defaultType)
Sets the default type of a property.
|
void |
setPropertyElementType(Class type,
String propertyName,
Class elementType)
Sets the default type of elements in a Collection or Map property.
|
void |
setScalarSerializer(Class type,
ScalarSerializer serializer)
Adds a serializer for the specified scalar type.
|
void |
setTagSuffix(String tagSuffix)
When not null, YAML read into a
Map stores any value tags using key + tagSuffix, and when writing YAML the value
tags are output. |
public final YamlConfig.WriteConfig writeConfig
public final YamlConfig.ReadConfig readConfig
public void setAllowDuplicates(boolean allowDuplicates)
public void setClassTag(String tag, Class type)
public void setScalarSerializer(Class type, ScalarSerializer serializer)
public void setPropertyElementType(Class type, String propertyName, Class elementType)
public void setPropertyDefaultType(Class type, String propertyName, Class defaultType)
public void setBeanProperties(boolean beanProperties)
public void setPrivateFields(boolean privateFields)
public void setPrivateConstructors(boolean privateConstructors)
Copyright © 2020. All rights reserved.