Package org.yaml.snakeyaml.constructor
Class Constructor
java.lang.Object
org.yaml.snakeyaml.constructor.BaseConstructor
org.yaml.snakeyaml.constructor.SafeConstructor
org.yaml.snakeyaml.constructor.Constructor
- Direct Known Subclasses:
CompactConstructor
,CustomClassLoaderConstructor
,EnvScalarConstructor
Construct a custom Java instance.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Construct mapping instance (Map, JavaBean) when the runtime class is known.protected class
Construct scalar instance when the runtime class is known.protected class
Construct sequence (List, Array, or immutable object) when the runtime class is known.protected class
Construct an instance when the runtime class is not known but a global tag with a class name is defined.Nested classes/interfaces inherited from class org.yaml.snakeyaml.constructor.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 org.yaml.snakeyaml.constructor.SafeConstructor
undefinedConstructor
Fields inherited from class org.yaml.snakeyaml.constructor.BaseConstructor
composer, constructedObjects, loadingConfig, rootTag, typeDefinitions, typeTags, yamlClassConstructors, yamlConstructors, yamlMultiConstructors
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor
(Class<? extends Object> theRoot) Create Constructor for the specified class as the root.Constructor
(Class<? extends Object> theRoot, LoaderOptions loadingConfig) Constructor
(String theRoot) Create Constructor for a class which does not have to be in the classpath or for a definition from a Spring ApplicationContext.Constructor
(String theRoot, LoaderOptions loadingConfig) Constructor
(LoaderOptions loadingConfig) Constructor
(TypeDescription theRoot) Constructor
(TypeDescription theRoot, Collection<TypeDescription> moreTDs) Constructor
(TypeDescription theRoot, Collection<TypeDescription> moreTDs, LoaderOptions loadingConfig) Constructor
(TypeDescription theRoot, LoaderOptions loadingConfig) -
Method Summary
Modifier and TypeMethodDescriptionprivate static final String
Ugly Java way to check the argument in the constructorprotected Class<?>
getClassForName
(String name) protected Class<?>
getClassForNode
(Node node) Methods inherited from class org.yaml.snakeyaml.constructor.SafeConstructor
constructMapping2ndStep, constructSet2ndStep, createLongOrBigInteger, flattenMapping, processDuplicateKeys
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, isExplicitPropertyUtils, isWrappedToRootException, newInstance, newInstance, newInstance, newList, newMap, newSet, postponeMapFilling, postponeSetFilling, setAllowDuplicateKeys, setComposer, setPropertyUtils, setWrappedToRootException
-
Constructor Details
-
Constructor
public Constructor() -
Constructor
-
Constructor
Create Constructor for the specified class as the root.- Parameters:
theRoot
- - the class (usually JavaBean) to be constructed
-
Constructor
-
Constructor
-
Constructor
-
Constructor
-
Constructor
public Constructor(TypeDescription theRoot, Collection<TypeDescription> moreTDs, LoaderOptions loadingConfig) -
Constructor
Create Constructor for a class which does not have to be in the classpath or for a definition from a Spring ApplicationContext.- Parameters:
theRoot
- fully qualified class name of the root class (usually JavaBean)- Throws:
ClassNotFoundException
- if cannot be loaded by the classloader
-
Constructor
- Throws:
ClassNotFoundException
-
-
Method Details
-
checkRoot
Ugly Java way to check the argument in the constructor -
check
-
getClassForNode
-
getClassForName
- Throws:
ClassNotFoundException
-