Package org.codehaus.janino

# Class ResourceFinderIClassLoader

java.lang.Object
org.codehaus.janino.IClassLoader
org.codehaus.janino.ResourceFinderIClassLoader

public class ResourceFinderIClassLoader extends IClassLoader
This `IClassLoader` loads IClasses through a a `ResourceFinder` that designates `ClassFile`s.

## 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
`ResourceFinderIClassLoader(ResourceFinder resourceFinder, IClassLoader parentIClassLoader)`

## Method Summary

Modifier and Type
Method
Description
`protected IClass`
`findIClass(String descriptor)`
Finds a new `IClass` by descriptor and calls `IClassLoader.defineIClass(IClass)`.

### Methods inherited from class org.codehaus.janino.IClassLoader

`createJavacLikePathIClassLoader, defineIClass, getArrayIClass, getArrayIClass, getParentIClassLoader, loadIClass, postConstruct`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ResourceFinderIClassLoader

public ResourceFinderIClassLoader(ResourceFinder resourceFinder, @Nullable IClassLoader parentIClassLoader)

## Method Details

### findIClass

@Nullable protected IClass findIClass(String descriptor) throws ClassNotFoundException
Description copied from class: `IClassLoader`
Finds a new `IClass` by descriptor and calls `IClassLoader.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 that `IClass` 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 class `IClassLoader`
Returns:
  `null` if a class with that descriptor could not be found
Throws:
  `ClassNotFoundException` - An exception was raised while loading the class