public static class YamlConfig.ReadConfig extends Object
Modifier and Type | Method and Description |
---|---|
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)
public void setClassLoader(ClassLoader classLoader)
public void setConstructorParameters(Class type, Class[] parameterTypes, String[] parameterNames)
public void setIgnoreUnknownProperties(boolean allowUnknownProperties)
YamlException
. Default is
false.public void setClassTags(boolean classTags)
public void setGuessNumberTypes(boolean guessNumberTypes)
Copyright © 2020. All rights reserved.