Top Description Fields Constructors Methods
org.yaml.snakeyaml.constructor

public Class CustomClassLoaderConstructor

extends Constructor
Class Inheritance
Imports
org.yaml.snakeyaml.LoaderOptions

Construct instances with a custom Class Loader.

Field Summary

Modifier and TypeField and Description
private final ClassLoader

Constructor Summary

AccessConstructor and Description
public
CustomClassLoaderConstructor(ClassLoader
- the class loader to find the class definition
loader
,
LoaderOptions
- options
loadingConfig
)

Create

public
CustomClassLoaderConstructor(Class<? extends Object>
- the class to instantiate
theRoot
,
ClassLoader
- the class loader to find the class definition
theLoader
,
LoaderOptions
- options
loadingConfig
)

Create

Method Summary

Modifier and TypeMethod and Description
protected Class<?>

Returns:

Class to create
getClassForName
(String
- the name
name
)

Overrides org.yaml.snakeyaml.constructor.Constructor.getClassForName.

Load the class
Inherited from org.yaml.snakeyaml.constructor.Constructor:
getClassForNode

Field Detail

loaderback to summary
private final ClassLoader loader

Constructor Detail

CustomClassLoaderConstructorback to summary
public CustomClassLoaderConstructor(ClassLoader loader, LoaderOptions loadingConfig)

Create

Parameters
loader:ClassLoader

- the class loader to find the class definition

loadingConfig:LoaderOptions

- options

CustomClassLoaderConstructorback to summary
public CustomClassLoaderConstructor(Class<? extends Object> theRoot, ClassLoader theLoader, LoaderOptions loadingConfig)

Create

Parameters
theRoot:Class<? extends Object>

- the class to instantiate

theLoader:ClassLoader

- the class loader to find the class definition

loadingConfig:LoaderOptions

- options

Method Detail

getClassForNameback to summary
protected Class<?> getClassForName(String name) throws ClassNotFoundException

Overrides org.yaml.snakeyaml.constructor.Constructor.getClassForName.

Load the class

Parameters
name:String

- the name

Returns:Class<?>

Class to create

Annotations
@Override
Exceptions
ClassNotFoundException:
- when cannot load the class