Package org.yaml.snakeyaml
Class LoaderOptions
- java.lang.Object
-
- org.yaml.snakeyaml.LoaderOptions
-
public class LoaderOptions extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowDuplicateKeys
private boolean
allowRecursiveKeys
private int
maxAliasesForCollections
private boolean
wrappedToRootException
-
Constructor Summary
Constructors Constructor Description LoaderOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getAllowRecursiveKeys()
int
getMaxAliasesForCollections()
boolean
isAllowDuplicateKeys()
boolean
isWrappedToRootException()
void
setAllowDuplicateKeys(boolean allowDuplicateKeys)
Allow/Reject duplicate map keys in the YAML file.void
setAllowRecursiveKeys(boolean allowRecursiveKeys)
void
setMaxAliasesForCollections(int maxAliasesForCollections)
void
setWrappedToRootException(boolean wrappedToRootException)
Wrap runtime exception to YAMLException during parsing or leave them as they are Default is to leave original exceptions
-
-
-
Method Detail
-
isAllowDuplicateKeys
public boolean isAllowDuplicateKeys()
-
setAllowDuplicateKeys
public void setAllowDuplicateKeys(boolean allowDuplicateKeys)
Allow/Reject duplicate map keys in the YAML file. Default is to allow. YAML 1.1 is slightly vague around duplicate entries in the YAML file. The best reference is 3.2.1.3. Nodes Comparison where it hints that a duplicate map key is an error. For future reference, YAML spec 1.2 is clear. The keys MUST be unique. 1.3. Relation to JSON- Parameters:
allowDuplicateKeys
- false to reject duplicate mapping keys
-
isWrappedToRootException
public boolean isWrappedToRootException()
-
setWrappedToRootException
public void setWrappedToRootException(boolean wrappedToRootException)
Wrap runtime exception to YAMLException during parsing or leave them as they are Default is to leave original exceptions- Parameters:
wrappedToRootException
- - true to convert runtime exception to YAMLException
-
getMaxAliasesForCollections
public int getMaxAliasesForCollections()
-
setMaxAliasesForCollections
public void setMaxAliasesForCollections(int maxAliasesForCollections)
-
setAllowRecursiveKeys
public void setAllowRecursiveKeys(boolean allowRecursiveKeys)
-
getAllowRecursiveKeys
public boolean getAllowRecursiveKeys()
-
-