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 YamlConfig.WriteConfig writeConfig
public YamlConfig.ReadConfig readConfig
public void setAllowDuplicates(boolean allowDuplicates)
allowDuplicates - allow duplicates.public void setClassTag(String tag, Class type)
tag - the tag to be used instead of the class.type - the class the tag will link to.public void setScalarSerializer(Class type, ScalarSerializer serializer)
type - the class type the serializer will be linked to.serializer - the serializer.public void setPropertyElementType(Class type, String propertyName, Class elementType)
type - default class.propertyName - name of property.elementType - element type.public void setPropertyDefaultType(Class type, String propertyName, Class defaultType)
type - class typepropertyName - name of propertydefaultType - default class type.public void setBeanProperties(boolean beanProperties)
beanProperties - bean properties.public void setPrivateFields(boolean privateFields)
privateFields - enable private fields.public void setPrivateConstructors(boolean privateConstructors)
privateConstructors - enable private constructors.Copyright © 2023. All rights reserved.