public static class YamlConfig.ReadConfig extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
setAnchors(boolean anchors)
When false, anchors in the YAML are ignored.
|
void |
setAutoMerge(boolean autoMerge)
When false, the merge key (<<) is not used to merge values into the current map.
|
void |
setClassLoader(ClassLoader classLoader)
Sets the class loader to use to find classes read from the YAML
|
void |
setClassTags(boolean classTags)
When false, tags are not used to look up classes.
|
void |
setConstructorParameters(Class type,
Class[] parameterTypes,
String[] parameterNames)
Sets the names of the constructor parameters so classes without no-arg constructors can be instantiated.
|
void |
setDefaultVersion(Version defaultVersion)
Sets the default YAML version to expect if a YAML document does not explicitly specify a version.
|
void |
setGuessNumberTypes(boolean guessNumberTypes)
When true, if the type for a scalar value is unknown and it looks like a number, it is read as a double or long.
|
void |
setIgnoreUnknownProperties(boolean allowUnknownProperties)
When true, fields in the YAML that are not found on the class will not throw a
YamlException. |
public void setDefaultVersion(Version defaultVersion)
defaultVersion - the default version to set.public void setClassLoader(ClassLoader classLoader)
classLoader - sets the class loader.public void setConstructorParameters(Class type, Class[] parameterTypes, String[] parameterNames)
type - the class type.parameterTypes - the parameter type.parameterNames - the parameter name.public void setIgnoreUnknownProperties(boolean allowUnknownProperties)
YamlException. Default is
false.allowUnknownProperties - allow unknown propertiespublic void setClassTags(boolean classTags)
classTags - enable/disable class tags.public void setAutoMerge(boolean autoMerge)
autoMerge - enable/disable automergepublic void setGuessNumberTypes(boolean guessNumberTypes)
guessNumberTypes - enable/disable guess number typespublic void setAnchors(boolean anchors)
anchors - enable/disable anchorsCopyright © 2023. All rights reserved.