Class ProxyClassLoader
java.lang.Object
java.lang.ClassLoader
com._1c.g5.v8.dt.internal.pm.classloading.ProxyClassLoader
A custom class loader which contains already loaded classes to set as a context class loader before invoking remote
method. This classloader is needed in order not to get NoClassDefFoundError
, ClassNotFoundException
or ClassCastException
.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs new instance withcontext class loader
as parent.ProxyClassLoader
(ClassLoader parent) Constructs a new instance with given parent classloader. -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<?>
static void
Updates a context class loader with new instance ofProxyClassLoader
with current context class loader as a parent.Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
ProxyClassLoader
public ProxyClassLoader()Constructs new instance withcontext class loader
as parent. -
ProxyClassLoader
Constructs a new instance with given parent classloader.
- Parameters:
parent
- given parent class loader (may benull
)
-
-
Method Details
-
updateContextClassloader
public static void updateContextClassloader()Updates a context class loader with new instance of
ProxyClassLoader
with current context class loader as a parent. -
findClass
- Overrides:
findClass
in classClassLoader
- Throws:
ClassNotFoundException
-