Package org.yaml.snakeyaml.constructor
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
-
public class CustomClassLoaderConstructor extends Constructor
Construct instances with a custom Class Loader.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.yaml.snakeyaml.constructor.Constructor
Constructor.ConstructMapping, Constructor.ConstructScalar, Constructor.ConstructSequence, Constructor.ConstructYamlObject
-
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, loadingConfig, NOT_INSTANTIATED_OBJECT, rootTag, typeDefinitions, typeTags, yamlClassConstructors, yamlConstructors, yamlMultiConstructors
-
-
Constructor Summary
Constructors Constructor Description CustomClassLoaderConstructor(Class<? extends Object> theRoot, ClassLoader theLoader, LoaderOptions loadingConfig)
CreateCustomClassLoaderConstructor(ClassLoader loader, LoaderOptions loadingConfig)
Create
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<?>
getClassForName(String name)
Load the class-
Methods inherited from class org.yaml.snakeyaml.constructor.Constructor
getClassForNode
-
Methods inherited from class org.yaml.snakeyaml.constructor.SafeConstructor
constructMapping2ndStep, constructSet2ndStep, createLongOrBigInteger, flattenMapping, flattenMapping, processDuplicateKeys, 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, getLoadingConfig, getPropertyUtils, getSingleData, isAllowDuplicateKeys, isEnumCaseSensitive, isExplicitPropertyUtils, isWrappedToRootException, newInstance, newInstance, newInstance, newList, newMap, newSet, postponeMapFilling, postponeSetFilling, setAllowDuplicateKeys, setComposer, setEnumCaseSensitive, setPropertyUtils, setWrappedToRootException
-
-
-
-
Constructor Detail
-
CustomClassLoaderConstructor
public CustomClassLoaderConstructor(ClassLoader loader, LoaderOptions loadingConfig)
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:
loadingConfig
- - optionstheRoot
- - the class to instantiatetheLoader
- - the class loader to find the class definition
-
-
Method Detail
-
getClassForName
protected Class<?> getClassForName(String name) throws ClassNotFoundException
Load the class- Overrides:
getClassForName
in classConstructor
- Parameters:
name
- - the name- Returns:
- Class to create
- Throws:
ClassNotFoundException
- - when cannot load the class
-
-