public class MyClassLoader extends ClassLoader
Modifier and Type | Field and Description |
---|---|
protected boolean |
_cfgUseParentLoader
Flag that determines if we should first try to load new class
using parent class loader or not; this may be done to try to
force access to protected/package-access properties.
|
Constructor and Description |
---|
MyClassLoader(ClassLoader parent,
boolean tryToUseParent) |
Modifier and Type | Method and Description |
---|---|
static boolean |
canAddClassInPackageOf(Class<?> cls)
Helper method called to check whether it is acceptable to create a new
class in package that given class is part of.
|
Class<?> |
loadAndResolve(ClassName className,
byte[] byteCode) |
static int |
replaceName(byte[] byteCode,
String from,
String to) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getProtectionDomainInternal, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
protected final boolean _cfgUseParentLoader
public MyClassLoader(ClassLoader parent, boolean tryToUseParent)
public static boolean canAddClassInPackageOf(Class<?> cls)
public Class<?> loadAndResolve(ClassName className, byte[] byteCode) throws IllegalArgumentException
className
- Interface or abstract class that class to load should extend or
implementIllegalArgumentException
Copyright © 2021 FasterXML. All rights reserved.