Package javassist
Class Loader.Simple
- java.lang.Object
-
- java.lang.ClassLoader
-
- javassist.Loader.Simple
-
- Enclosing class:
- Loader
public static class Loader.Simple extends java.lang.ClassLoaderA simpler class loader. This is a class loader that exposes the protecteddefineClass()method declared injava.lang.ClassLoader. It provides a method similar toCtClass#toClass().When loading a class, this class loader delegates the work to the parent class loader unless the loaded classes are explicitly given by
invokeDefineClass(CtClass). Note that a classFooloaded by this class loader is different from the class with the same nameFoobut loaded by another class loader. This is Java's naming rule.- Since:
- 3.24
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>invokeDefineClass(CtClass cc)Invokes the protecteddefineClass()inClassLoader.-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, 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
-
-
-
-
Method Detail
-
invokeDefineClass
public java.lang.Class<?> invokeDefineClass(CtClass cc) throws java.io.IOException, CannotCompileException
Invokes the protecteddefineClass()inClassLoader. It converts the givenCtClassobject into ajava.lang.Classobject.- Throws:
java.io.IOExceptionCannotCompileException
-
-