public class SafeConstructor extends BaseConstructor
Modifier and Type | Class and Description |
---|---|
static class |
SafeConstructor.ConstructUndefined |
class |
SafeConstructor.ConstructYamlBinary |
class |
SafeConstructor.ConstructYamlBool |
class |
SafeConstructor.ConstructYamlFloat |
class |
SafeConstructor.ConstructYamlInt |
class |
SafeConstructor.ConstructYamlMap |
class |
SafeConstructor.ConstructYamlNull |
class |
SafeConstructor.ConstructYamlOmap |
class |
SafeConstructor.ConstructYamlPairs |
class |
SafeConstructor.ConstructYamlSeq |
class |
SafeConstructor.ConstructYamlSet |
class |
SafeConstructor.ConstructYamlStr |
static class |
SafeConstructor.ConstructYamlTimestamp |
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,java.lang.Boolean> |
BOOL_VALUES |
private static int[][] |
RADIX_MAX |
private static java.util.regex.Pattern |
TIMESTAMP_REGEXP |
static SafeConstructor.ConstructUndefined |
undefinedConstructor |
private static java.util.regex.Pattern |
YMD_REGEXP |
composer, constructedObjects, loadingConfig, NOT_INSTANTIATED_OBJECT, rootTag, typeDefinitions, typeTags, yamlClassConstructors, yamlConstructors, yamlMultiConstructors
Constructor and Description |
---|
SafeConstructor() |
SafeConstructor(LoaderOptions loadingConfig) |
Modifier and Type | Method and Description |
---|---|
protected void |
constructMapping2ndStep(MappingNode node,
java.util.Map<java.lang.Object,java.lang.Object> mapping) |
protected void |
constructSet2ndStep(MappingNode node,
java.util.Set<java.lang.Object> set) |
protected static java.lang.Number |
createLongOrBigInteger(java.lang.String number,
int radix) |
private java.lang.Number |
createNumber(int sign,
java.lang.String number,
int radix) |
protected void |
flattenMapping(MappingNode node) |
protected void |
flattenMapping(MappingNode node,
boolean forceStringKeys) |
private static int |
maxLen(int max,
int radix) |
private static int |
maxLen(long max,
int radix) |
private java.util.List<NodeTuple> |
mergeNode(MappingNode node,
boolean isPreffered,
java.util.Map<java.lang.Object,java.lang.Integer> key2index,
java.util.List<NodeTuple> values,
boolean forceStringKeys)
Does merge for supplied mapping node.
|
protected void |
processDuplicateKeys(MappingNode node) |
protected void |
processDuplicateKeys(MappingNode node,
boolean forceStringKeys) |
addTypeDescription, checkData, constructArray, constructArrayStep2, constructDocument, constructMapping, constructObject, constructObjectNoCheck, constructScalar, constructSequence, constructSequenceStep2, constructSet, constructSet, createArray, createDefaultList, createDefaultMap, createDefaultSet, finalizeConstruction, getConstructor, getData, getPropertyUtils, getSingleData, isAllowDuplicateKeys, isEnumCaseSensitive, isExplicitPropertyUtils, isWrappedToRootException, newInstance, newInstance, newInstance, newList, newMap, newSet, postponeMapFilling, postponeSetFilling, setAllowDuplicateKeys, setComposer, setEnumCaseSensitive, setPropertyUtils, setWrappedToRootException
public static final SafeConstructor.ConstructUndefined undefinedConstructor
private static final java.util.Map<java.lang.String,java.lang.Boolean> BOOL_VALUES
private static final int[][] RADIX_MAX
private static final java.util.regex.Pattern TIMESTAMP_REGEXP
private static final java.util.regex.Pattern YMD_REGEXP
public SafeConstructor()
public SafeConstructor(LoaderOptions loadingConfig)
protected void flattenMapping(MappingNode node)
protected void flattenMapping(MappingNode node, boolean forceStringKeys)
protected void processDuplicateKeys(MappingNode node)
protected void processDuplicateKeys(MappingNode node, boolean forceStringKeys)
private java.util.List<NodeTuple> mergeNode(MappingNode node, boolean isPreffered, java.util.Map<java.lang.Object,java.lang.Integer> key2index, java.util.List<NodeTuple> values, boolean forceStringKeys)
node
- where to mergeisPreffered
- true if keys of node should take precedence over others...key2index
- maps already merged keys to index from valuesvalues
- collects merged NodeTupleprotected void constructMapping2ndStep(MappingNode node, java.util.Map<java.lang.Object,java.lang.Object> mapping)
constructMapping2ndStep
in class BaseConstructor
protected void constructSet2ndStep(MappingNode node, java.util.Set<java.lang.Object> set)
constructSet2ndStep
in class BaseConstructor
private static int maxLen(int max, int radix)
private static int maxLen(long max, int radix)
private java.lang.Number createNumber(int sign, java.lang.String number, int radix)
protected static java.lang.Number createLongOrBigInteger(java.lang.String number, int radix)