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 Modifier and Type Field Description private java.lang.ClassLoader
loader
-
Fields inherited from class org.yaml.snakeyaml.constructor.SafeConstructor
undefinedConstructor
-
Fields inherited from class org.yaml.snakeyaml.constructor.BaseConstructor
composer, constructedObjects, loadingConfig, NOT_INSTANTIATED_OBJECT, rootTag, typeDefinitions, typeTags, yamlClassConstructors, yamlConstructors, yamlMultiConstructors
-
-
Constructor Summary
Constructors Constructor Description CustomClassLoaderConstructor(java.lang.Class<? extends java.lang.Object> theRoot, java.lang.ClassLoader theLoader)
CreateCustomClassLoaderConstructor(java.lang.ClassLoader cLoader)
Create
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Class<?>
getClassForName(java.lang.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, getPropertyUtils, getSingleData, isAllowDuplicateKeys, isEnumCaseSensitive, isExplicitPropertyUtils, isWrappedToRootException, newInstance, newInstance, newInstance, newList, newMap, newSet, postponeMapFilling, postponeSetFilling, setAllowDuplicateKeys, setComposer, setEnumCaseSensitive, setPropertyUtils, setWrappedToRootException
-
-
-
-
Constructor Detail
-
CustomClassLoaderConstructor
public CustomClassLoaderConstructor(java.lang.ClassLoader cLoader)
Create- Parameters:
cLoader
- the class loader to find the class definition
-
CustomClassLoaderConstructor
public CustomClassLoaderConstructor(java.lang.Class<? extends java.lang.Object> theRoot, java.lang.ClassLoader theLoader)
Create- Parameters:
theRoot
- - the class to instantiatetheLoader
- - the class loader to find the class definition
-
-
Method Detail
-
getClassForName
protected java.lang.Class<?> getClassForName(java.lang.String name) throws java.lang.ClassNotFoundException
Load the class- Overrides:
getClassForName
in classConstructor
- Parameters:
name
- - the name- Returns:
- Class to create
- Throws:
java.lang.ClassNotFoundException
- - when cannot load the class
-
-