Class CustomClassLoaderConstructor
java.lang.Object
org.yaml.snakeyaml.constructor.BaseConstructor
org.yaml.snakeyaml.constructor.SafeConstructor
org.yaml.snakeyaml.constructor.Constructor
org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor
Construct instances with a custom Class Loader.
-
Nested Class Summary
Nested 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
ConstructorsConstructorDescriptionCustomClassLoaderConstructor(Class<? extends Object> theRoot, ClassLoader theLoader, LoaderOptions loadingConfig) CreateCustomClassLoaderConstructor(ClassLoader loader, LoaderOptions loadingConfig) Create -
Method Summary
Methods inherited from class Constructor
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, getConstructor, getData, getLoadingConfig, getPropertyUtils, getSingleData, isAllowDuplicateKeys, isEnumCaseSensitive, isExplicitPropertyUtils, isWrappedToRootException, newInstance, newInstance, newInstance, newList, newMap, newSet, postponeMapFilling, postponeSetFilling, setAllowDuplicateKeys, setComposer, setEnumCaseSensitive, setPropertyUtils, setWrappedToRootException
-
Constructor Details
-
CustomClassLoaderConstructor
Create- Parameters:
loader- - the class loader to find the class definitionloadingConfig- - options
-
CustomClassLoaderConstructor
public CustomClassLoaderConstructor(Class<? extends Object> theRoot, ClassLoader theLoader, LoaderOptions loadingConfig) Create- Parameters:
theRoot- - the class to instantiatetheLoader- - the class loader to find the class definitionloadingConfig- - options
-
-
Method Details
-
getClassForName
Load the class- Overrides:
getClassForNamein classConstructor- Parameters:
name- - the name- Returns:
- Class to create
- Throws:
ClassNotFoundException- - when cannot load the class
-