public class LoaderOptions extends Object
| Constructor and Description |
|---|
LoaderOptions() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllowRecursiveKeys() |
int |
getMaxAliasesForCollections() |
boolean |
isAllowDuplicateKeys() |
boolean |
isEnumCaseSensitive() |
boolean |
isProcessComments() |
boolean |
isWrappedToRootException() |
void |
setAllowDuplicateKeys(boolean allowDuplicateKeys)
Allow/Reject duplicate map keys in the YAML file.
|
void |
setAllowRecursiveKeys(boolean allowRecursiveKeys)
Allow recursive keys for mappings.
|
void |
setEnumCaseSensitive(boolean enumCaseSensitive)
Disables or enables case sensitivity during construct enum constant from string value
Default is false.
|
void |
setMaxAliasesForCollections(int maxAliasesForCollections)
Restrict the amount of aliases for collections (sequences and mappings) to avoid https://en.wikipedia.org/wiki/Billion_laughs_attack
|
void |
setProcessComments(boolean processComments)
Set the comment processing.
|
void |
setWrappedToRootException(boolean wrappedToRootException)
Wrap runtime exception to YAMLException during parsing or leave them as they are
Default is to leave original exceptions
|
public boolean isAllowDuplicateKeys()
public void setAllowDuplicateKeys(boolean allowDuplicateKeys)
allowDuplicateKeys - false to reject duplicate mapping keyspublic boolean isWrappedToRootException()
public void setWrappedToRootException(boolean wrappedToRootException)
wrappedToRootException - - true to convert runtime exception to YAMLExceptionpublic int getMaxAliasesForCollections()
public void setMaxAliasesForCollections(int maxAliasesForCollections)
maxAliasesForCollections - set max allowed value (50 by default)public void setAllowRecursiveKeys(boolean allowRecursiveKeys)
allowRecursiveKeys - - false to disable recursive keyspublic boolean getAllowRecursiveKeys()
public void setProcessComments(boolean processComments)
processComments - true to process; false to ignorepublic boolean isProcessComments()
public boolean isEnumCaseSensitive()
public void setEnumCaseSensitive(boolean enumCaseSensitive)
enumCaseSensitive - - true to set enum case sensitive, false the reverseCopyright © 2008–2021. All rights reserved.