Package org.yaml.snakeyaml.constructor
Class SafeConstructor
java.lang.Object
org.yaml.snakeyaml.constructor.BaseConstructor
org.yaml.snakeyaml.constructor.SafeConstructor
- Direct Known Subclasses:
Constructor
Construct standard Java classes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
class
class
class
class
class
class
class
class
class
class
class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int[][]
private static final Pattern
static final SafeConstructor.ConstructUndefined
private static final Pattern
Fields inherited from class org.yaml.snakeyaml.constructor.BaseConstructor
composer, constructedObjects, loadingConfig, NOT_INSTANTIATED_OBJECT, rootTag, typeDefinitions, typeTags, yamlClassConstructors, yamlConstructors, yamlMultiConstructors
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
constructMapping2ndStep
(MappingNode node, Map<Object, Object> mapping) Fill provided Map with constructed dataprotected void
constructSet2ndStep
(MappingNode node, Set<Object> set) protected static Number
createLongOrBigInteger
(String number, int radix) private Number
createNumber
(int sign, 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) mergeNode
(MappingNode node, boolean isPreffered, Map<Object, Integer> key2index, List<NodeTuple> values, boolean forceStringKeys) Does merge for supplied mapping node.protected void
protected void
processDuplicateKeys
(MappingNode node, boolean forceStringKeys) Methods inherited from class org.yaml.snakeyaml.constructor.BaseConstructor
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
-
Field Details
-
undefinedConstructor
-
BOOL_VALUES
-
RADIX_MAX
private static final int[][] RADIX_MAX -
TIMESTAMP_REGEXP
-
YMD_REGEXP
-
-
Constructor Details
-
SafeConstructor
Deprecated.use options -
SafeConstructor
-
-
Method Details
-
flattenMapping
-
flattenMapping
-
processDuplicateKeys
-
processDuplicateKeys
-
mergeNode
private List<NodeTuple> mergeNode(MappingNode node, boolean isPreffered, Map<Object, Integer> key2index, List<NodeTuple> values, boolean forceStringKeys) Does merge for supplied mapping node.- Parameters:
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 NodeTuple- Returns:
- list of the merged NodeTuple (to be set as value for the MappingNode)
-
constructMapping2ndStep
Description copied from class:BaseConstructor
Fill provided Map with constructed data- Overrides:
constructMapping2ndStep
in classBaseConstructor
- Parameters:
node
- - sourcemapping
- - map to fill
-
constructSet2ndStep
- Overrides:
constructSet2ndStep
in classBaseConstructor
-
maxLen
private static int maxLen(int max, int radix) -
maxLen
private static int maxLen(long max, int radix) -
createNumber
-
createLongOrBigInteger
-