Class CompactConstructor
java.lang.Object
org.yaml.snakeyaml.constructor.BaseConstructor
org.yaml.snakeyaml.constructor.SafeConstructor
org.yaml.snakeyaml.constructor.Constructor
org.yaml.snakeyaml.extensions.compactnotation.CompactConstructor
- Direct Known Subclasses:
PackageCompactConstructor
Construct a custom Java instance out of a compact object notation format.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassCustom ConstructMappingNested classes/interfaces inherited from class Constructor
Constructor.ConstructMapping, Constructor.ConstructScalar, Constructor.ConstructSequence, Constructor.ConstructYamlObjectNested classes/interfaces inherited from class SafeConstructor
SafeConstructor.ConstructUndefined, SafeConstructor.ConstructYamlBinary, SafeConstructor.ConstructYamlBool, SafeConstructor.ConstructYamlFloat, SafeConstructor.ConstructYamlInt, SafeConstructor.ConstructYamlMap, SafeConstructor.ConstructYamlNull, SafeConstructor.ConstructYamlOmap, SafeConstructor.ConstructYamlPairs, SafeConstructor.ConstructYamlSeq, SafeConstructor.ConstructYamlSet, SafeConstructor.ConstructYamlStr, SafeConstructor.ConstructYamlTimestamp -
Field Summary
Fields inherited from class SafeConstructor
undefinedConstructorFields inherited from class BaseConstructor
composer, loadingConfig, NOT_INSTANTIATED_OBJECT, rootTag, typeDefinitions, typeTags, yamlClassConstructors, yamlConstructors, yamlMultiConstructors -
Constructor Summary
ConstructorsConstructorDescriptionCreate with defaultsCompactConstructor(LoaderOptions loadingConfig) Create with provided options -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplySequence(Object bean, List<?> value) protected ObjectconstructCompactFormat(ScalarNode node, CompactData data) protected ConstructCreateprotected ObjectcreateInstance(ScalarNode node, CompactData data) getCompactData(String scalar) protected ConstructgetConstructor(Node node) Get the constructor to construct the Node.protected StringgetSequencePropertyName(Class<?> bean) Provide the name of the property which is used when the entries form a sequence.protected voidsetProperties(Object bean, Map<String, Object> data) Methods inherited from class Constructor
getClassForName, getClassForNodeMethods inherited from class SafeConstructor
constructMapping2ndStep, constructSet2ndStep, createLongOrBigInteger, flattenMapping, flattenMapping, processDuplicateKeys, processDuplicateKeysMethods inherited from class BaseConstructor
addTypeDescription, checkData, constructArray, constructArrayStep2, constructDocument, constructMapping, constructObject, constructObjectNoCheck, constructScalar, constructSequence, constructSequenceStep2, constructSet, constructSet, createArray, createDefaultList, createDefaultMap, createDefaultSet, finalizeConstruction, getData, getLoadingConfig, getPropertyUtils, getSingleData, isAllowDuplicateKeys, isEnumCaseSensitive, isExplicitPropertyUtils, isWrappedToRootException, newInstance, newInstance, newInstance, newList, newMap, newSet, postponeMapFilling, postponeSetFilling, setAllowDuplicateKeys, setComposer, setEnumCaseSensitive, setPropertyUtils, setWrappedToRootException
-
Constructor Details
-
CompactConstructor
Create with provided options- Parameters:
loadingConfig- - options
-
CompactConstructor
public CompactConstructor()Create with defaults
-
-
Method Details
-
constructCompactFormat
-
createInstance
- Throws:
Exception
-
setProperties
-
getCompactData
-
createCompactConstruct
-
getConstructor
Description copied from class:BaseConstructorGet the constructor to construct the Node. For implicit tags if the runtime class is known a dedicated Construct implementation is used. Otherwise, the constructor is chosen by the tag.- Overrides:
getConstructorin classBaseConstructor- Parameters:
node-Nodeto construct an instance from- Returns:
Constructimplementation for the specified node
-
applySequence
-
getSequencePropertyName
-