Package org.codehaus.janino
Class ClassLoaderIClassLoader
- java.lang.Object
-
- org.codehaus.janino.IClassLoader
-
- org.codehaus.janino.ClassLoaderIClassLoader
-
public class ClassLoaderIClassLoader extends IClassLoader
-
-
Field Summary
-
Fields inherited from class org.codehaus.janino.IClassLoader
CTOR_java_lang_StringBuilder__java_lang_String, METH_java_lang_Enum__ordinal, METH_java_lang_Iterable__iterator, METH_java_lang_String__concat__java_lang_String, METH_java_lang_String__equals__java_lang_Object, METH_java_lang_String__hashCode, METH_java_lang_String__valueOf__boolean, METH_java_lang_String__valueOf__char, METH_java_lang_String__valueOf__double, METH_java_lang_String__valueOf__float, METH_java_lang_String__valueOf__int, METH_java_lang_String__valueOf__java_lang_Object, METH_java_lang_String__valueOf__long, METH_java_lang_StringBuilder__append__boolean, METH_java_lang_StringBuilder__append__char, METH_java_lang_StringBuilder__append__double, METH_java_lang_StringBuilder__append__float, METH_java_lang_StringBuilder__append__int, METH_java_lang_StringBuilder__append__java_lang_Object, METH_java_lang_StringBuilder__append__java_lang_String, METH_java_lang_StringBuilder__append__long, METH_java_lang_StringBuilder__toString, METH_java_lang_Throwable__addSuppressed, METH_java_util_Iterator__hasNext, METH_java_util_Iterator__next, TYPE_java_io_Serializable, TYPE_java_lang_annotation_Retention, TYPE_java_lang_AssertionError, TYPE_java_lang_Boolean, TYPE_java_lang_Byte, TYPE_java_lang_Character, TYPE_java_lang_Class, TYPE_java_lang_Cloneable, TYPE_java_lang_Double, TYPE_java_lang_Enum, TYPE_java_lang_Error, TYPE_java_lang_Exception, TYPE_java_lang_Float, TYPE_java_lang_Integer, TYPE_java_lang_Iterable, TYPE_java_lang_Long, TYPE_java_lang_Object, TYPE_java_lang_Override, TYPE_java_lang_RuntimeException, TYPE_java_lang_Short, TYPE_java_lang_String, TYPE_java_lang_StringBuilder, TYPE_java_lang_System, TYPE_java_lang_Throwable, TYPE_java_lang_Void, TYPE_java_util_Iterator
-
-
Constructor Summary
Constructors Constructor Description ClassLoaderIClassLoader()
Equivalent toClassLoaderIClassLoader(java.lang.ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IClass
findIClass(java.lang.String descriptor)
Finds a newIClass
by descriptor and callsIClassLoader.defineIClass(IClass)
.java.lang.ClassLoader
getClassLoader()
-
Methods inherited from class org.codehaus.janino.IClassLoader
createJavacLikePathIClassLoader, defineIClass, getArrayIClass, getArrayIClass, getParentIClassLoader, loadIClass, postConstruct
-
-
-
-
Constructor Detail
-
ClassLoaderIClassLoader
public ClassLoaderIClassLoader(java.lang.ClassLoader classLoader)
- Parameters:
classLoader
- The delegate that loads the classes
-
ClassLoaderIClassLoader
public ClassLoaderIClassLoader()
Equivalent toClassLoaderIClassLoader(Thread.currentThread().getContextClassLoader())
-
-
Method Detail
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
- Returns:
- The delegate
ClassLoader
-
findIClass
@Nullable protected IClass findIClass(java.lang.String descriptor) throws java.lang.ClassNotFoundException
Description copied from class:IClassLoader
Finds a newIClass
by descriptor and callsIClassLoader.defineIClass(IClass)
.Similar
ClassLoader.findClass(java.lang.String)
, this method must- Get an
IClass
object from somewhere for the given type - Call
IClassLoader.defineIClass(IClass)
with thatIClass
object as the argument - Return the
IClass
object
The format of a
descriptor
is defined in JVMS 4.3.2. Typical descriptors are:I
(Integer)Lpkg1/pkg2/Clazz;
(Class declared in package)Lpkg1/pkg2/Outer$Inner;
Member class
Notice that this method is never called for array types.
Notice that this method is never called from more than one thread at a time. In other words, implementations of this method need not be thread-safe.
- Specified by:
findIClass
in classIClassLoader
- Returns:
null
if a class with that descriptor could not be found- Throws:
java.lang.ClassNotFoundException
- An exception was raised while loading the class
- Get an
-
-