Package: groovy.lang

## [Java] Class GroovyClassLoader.InnerLoader

- groovy.lang.GroovyClassLoader.InnerLoader

-     public static class GroovyClassLoader.InnerLoader
      extends GroovyClassLoader

  Loader used while defining classes during a compilation round.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class GroovyClassLoader` | `classCache, sourceCache`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `InnerLoader(GroovyClassLoader delegate)` Creates an inner loader delegating to the supplied outer Groovy class loader.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `addClasspath(String path)` * adds a classpath to this classloader. * * Parameters: `path` - is a jar file or a directory. * See Also: addURL(URL)
    `` | `public void` | `addURL(URL url)` * adds a URL to the classloader. * * Parameters: `url` - the new classpath element
    `` | `public void` | `clearAssertionStatus()` Sets the default assertion status for this class loader to `false` and discards any package defaults or class assertion status settings associated with the class loader. This method is provided so that class loaders can be made to ignore any command line or persistent assertion status settings and "start with a clean slate." Since: 1.4
    `` | `public void` | `clearCache()` * Removes all classes from the class cache. * * In addition to internal caches this method also clears any * previously set MetaClass information for the given set of * classes being removed. * * See Also: * * removeClassCacheEntry(String)
    `` | `public void` | `close()` * Closes this GroovyClassLoader and clears any caches it maintains. * * No use should be made of this instance after this method is * invoked. Any classes that are already loaded are still accessible. * * throws: IOException * See Also: * * Since: 2.5.0
    `` | `public Class` | `defineClass(ClassNode classNode, String file, String newCodeBase)` * Compiles the given `ClassNode` returning the resulting `Class`. * * WARNING: compilation is not synchronized
    `` | `public Class` | `defineClass(String name, byte[] b)` * Converts an array of bytes into an instance of `Class`. Before the * class can be used it must be resolved.
    `` | `public URL` | `findResource(String name)` Finds the resource with the specified name on the URL search path. Parameters: `name` - the name of the resource Returns: a `URL` for the resource, or `null` if the resource could not be found, or if the loader is closed.
    `` | `public Enumeration<URL>` | `findResources(String name)` Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name. throws: IOException if an I/O exception occurs Parameters: `name` - the resource name Returns: An `Enumeration` of `URL`s. If the loader is closed, the Enumeration contains no elements.
    `` | `public String` | `generateScriptName()` * Generates a unique script name for unnamed parsed sources. * * Returns: a unique script name ending in `.groovy`
    `` | `public Class[]` | `getLoadedClasses()` * Returns all Groovy classes loaded by this class loader. * * Returns: all classes loaded by this class loader
    `` | `public URL` | `getResource(String name)` Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code. The name of a resource is a '`/`'-separated path name that identifies the resource. Resources in named modules are subject to the encapsulation rules specified by Module.getResourceAsStream. Additionally, and except for the special case where the resource has a name ending with "`.class`", this method will only find resources in packages of named modules when the package is opened unconditionally (even if the caller of this method is in the same module as the resource). throws: NullPointerException If `name` is `null` revised: 9 Implementation Requirements: The default implementation will first search the parent class loader for the resource; if the parent is `null` the path of the class loader built into the virtual machine is searched. If not found, this method will invoke findResource(String) to find the resource. API Note: Where several modules are defined to the same class loader, and where more than one module contains a resource with the given name, then the ordering that modules are searched is not specified and may be very unpredictable. When overriding this method it is recommended that an implementation ensures that any delegation is consistent with the getResources(java.lang.String) getResources(String) method. Parameters: `name` - The resource name Returns: `URL` object for reading the resource; `null` if the resource could not be found, a `URL` could not be constructed to locate the resource, the resource is in a package that is not opened unconditionally, or access to the resource is denied by the security manager. Since: 1.1
    `` | `public InputStream` | `getResourceAsStream(String name)` Returns an input stream for reading the specified resource. If this loader is closed, then any resources opened by this method will be closed. The search order is described in the documentation for getResource(String). throws: NullPointerException If `name` is `null` Parameters: `name` - The resource name Returns: An input stream for reading the resource, or `null` if the resource could not be found Since: 1.7
    `` | `public GroovyResourceLoader` | `getResourceLoader()` * Returns the resource loader used to resolve Groovy source by script name. * * Returns: the current resource loader
    `` | `public Enumeration<URL>` | `getResources(String name)` Finds all the resources with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code. The name of a resource is a `/`-separated path name that identifies the resource. Resources in named modules are subject to the encapsulation rules specified by Module.getResourceAsStream. Additionally, and except for the special case where the resource has a name ending with "`.class`", this method will only find resources in packages of named modules when the package is opened unconditionally (even if the caller of this method is in the same module as the resource). throws: IOException If I/O errors occur throws: NullPointerException If `name` is `null` revised: 9 Implementation Requirements: The default implementation will first search the parent class loader for the resource; if the parent is `null` the path of the class loader built into the virtual machine is searched. It then invokes findResources(String) to find the resources with the name in this class loader. It returns an enumeration whose elements are the URLs found by searching the parent class loader followed by the elements found with `findResources`. API Note: Where several modules are defined to the same class loader, and where more than one module contains a resource with the given name, then the ordering is not specified and may be very unpredictable. When overriding this method it is recommended that an implementation ensures that any delegation is consistent with the getResource(java.lang.String) getResource(String) method. This should ensure that the first element returned by the Enumeration's `nextElement` method is the same resource that the `getResource(String)` method would return. Parameters: `name` - The resource name Returns: An enumeration of URL objects for the resource. If no resources could be found, the enumeration will be empty. Resources for which a `URL` cannot be constructed, are in a package that is not opened unconditionally, or access to the resource is denied by the security manager, are not returned in the enumeration. Since: 1.2
    `` | `public long` | `getTimeStamp()` Returns the creation timestamp of this inner loader.
    `` | `public URL[]` | `getURLs()` Returns the search path of URLs for loading classes and resources. This includes the original list of URLs specified to the constructor, along with any URLs subsequently appended by the addURL() method. Returns: the search path of URLs for loading classes and resources.
    `` | `public Boolean` | `isShouldRecompile()` * gets the currently set recompilation mode. null means, the * compiler configuration is used. False means no recompilation and * true means that recompilation will be done if needed. * * Returns: the recompilation mode
    `` | `public Class<?>` | `loadClass(String name)` * Loads the class with the specified binary name. This method searches for classes in the same manner as the loadClass(String, boolean) method. It is invoked by the Java virtual machine to resolve class references. Invoking this method is equivalent to invoking loadClass(name,. throws: ClassNotFoundException If the class was not found Parameters: `name` - The binary name of the class Returns: The resulting `Class` object * * See Also: ClassLoader#loadClass(java.lang.String,boolean)
    `` | `public Class` | `loadClass(String name, boolean lookupScriptFiles, boolean preferClassOverScript)` * Loads a class from a file or a parent loader. This method delegates to: *
             * loadClass(name, lookupScriptFiles, preferClassOverScript, false);
             *
    * * throws: ClassNotFoundException if class could not be found * throws: CompilationFailedException if compilation of script failed
    `` | `public Class` | `loadClass(String name, boolean lookupScriptFiles, boolean preferClassOverScript, boolean resolve)` * Loads a class from a file or a parent loader. * * throws: ClassNotFoundException if class could not be found * throws: CompilationFailedException if compilation of script failed Parameters: `name` - of the class to be loaded * `lookupScriptFiles` - if false no lookup at files is done at all * `preferClassOverScript` - if true the file lookup is only done if there is no class * `resolve` - see ClassLoader.loadClass * Returns: the class found or the class created from a file lookup *
    `` | `public Class` | `parseClass(File file)` * Parses the given file into a Java class capable of being run * * Parameters: `file` - the file name to parse * Returns: the main class defined in the given script
    `` | `public Class` | `parseClass(GroovyCodeSource codeSource)` * Parses Groovy source described by a GroovyCodeSource. * * throws: CompilationFailedException if compilation fails Parameters: `codeSource` - the code source to compile * Returns: the main class defined by the source *
    `` | `public Class` | `parseClass(GroovyCodeSource codeSource, boolean shouldCache)` * Parses the given code source into a Java class. If there is a class file * for the given code source, then no parsing is done, instead the cached class is returned. * * Parameters: `shouldCacheSource` - if true then the generated class will be stored in the source cache * Returns: the main class defined in the given script
    `` | `public Class` | `parseClass(Reader reader, String fileName)` * Parses Groovy source read from a Reader. * * throws: CompilationFailedException if compilation fails Parameters: `reader` - the reader supplying source text * `fileName` - the logical script name * Returns: the main class defined by the source *
    `` | `public Class` | `parseClass(String text)` * Parses the given text into a Java class capable of being run * * Parameters: `text` - the text of the script/class to parse * Returns: the main class defined in the given script
    `` | `public Class` | `parseClass(String text, String fileName)` * Parses the given text into a Java class capable of being run * * Parameters: `text` - the text of the script/class to parse * `fileName` - the file name to use as the name of the class * Returns: the main class defined in the given script
    `` | `public void` | `setClassAssertionStatus(String className, boolean enabled)` Sets the desired assertion status for the named top-level class in this class loader and any nested classes contained therein. This setting takes precedence over the class loader's default assertion status, and over any applicable per-package default. This method has no effect if the named class has already been initialized. (Once a class is initialized, its assertion status cannot change.) If the named class is not a top-level class, this invocation will have no effect on the actual assertion status of any class. Parameters: `className` - The fully qualified class name of the top-level class whose assertion status is to be set. `enabled` - `true` if the named class is to have assertions enabled when (and if) it is initialized, `false` if the class is to have assertions disabled. Since: 1.4
    `` | `public void` | `setDefaultAssertionStatus(boolean enabled)` Sets the default assertion status for this class loader. This setting determines whether classes loaded by this class loader and initialized in the future will have assertions enabled or disabled by default. This setting may be overridden on a per-package or per-class basis by invoking setPackageAssertionStatus(String, boolean) or setClassAssertionStatus(String, boolean). Parameters: `enabled` - `true` if classes loaded by this class loader will henceforth have assertions enabled by default, `false` if they will have assertions disabled by default. Since: 1.4
    `` | `public void` | `setPackageAssertionStatus(String packageName, boolean enabled)` Sets the package default assertion status for the named package. The package default assertion status determines the assertion status for classes initialized in the future that belong to the named package or any of its "subpackages". A subpackage of a package named p is any package whose name begins with "`p.`". For example, `javax.swing.text` is a subpackage of `javax.swing`, and both `java.util` and `java.lang.reflect` are subpackages of `java`. In the event that multiple package defaults apply to a given class, the package default pertaining to the most specific package takes precedence over the others. For example, if `javax.lang` and `javax.lang.reflect` both have package defaults associated with them, the latter package default applies to classes in `javax.lang.reflect`. Package defaults take precedence over the class loader's default assertion status, and may be overridden on a per-class basis by invoking setClassAssertionStatus(String, boolean). Parameters: `packageName` - The name of the package whose package default assertion status is to be set. A `null` value indicates the unnamed package that is "current" (see section {@jls 7.4.2} of The Java Language Specification.) `enabled` - `true` if classes loaded by this classloader and belonging to the named package or any of its subpackages will have assertions enabled by default, `false` if they will have assertions disabled by default. Since: 1.4
    `` | `public void` | `setResourceLoader(GroovyResourceLoader resourceLoader)` * Sets the resource loader used to resolve Groovy source by script name. * * Parameters: `resourceLoader` - the resource loader to use
    `` | `public void` | `setShouldRecompile(Boolean mode)` * sets if the recompilation should be enabled. There are 3 possible * values for this. Any value different from null overrides the * value from the compiler configuration. true means to recompile if needed * false means to never recompile. * * Parameters: `mode` - the recompilation mode * See Also: CompilerConfiguration

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GroovyClassLoader` | `addClasspath, addURL, clearCache, close, createCollector, createCompilationUnit, defineClass, defineClass, genEncodingString, generateScriptName, getClassCacheEntry, getClassPath, getLoadedClasses, getPermissions, getResourceLoader, getTimeStamp, hasCompatibleConfiguration, isRecompilable, isShouldRecompile, isSourceNewer, loadClass, loadClass, loadClass, loadClass, parseClass, parseClass, parseClass, parseClass, parseClass, parseClass, recompile, removeClassCacheEntry, setClassCacheEntry, setResourceLoader, setShouldRecompile`

- - ### Constructor Detail

    - #### public InnerLoader(GroovyClassLoader delegate)

      Creates an inner loader delegating to the supplied outer Groovy class loader.

      Parameters:
        `delegate` - the outer loader that owns caches and resources

  - ### Method Detail

    - #### public void addClasspath(String path)

      * adds a classpath to this classloader. * *

      Parameters:
        `path` - is a jar file or a directory. *
      See Also:
        addURL(URL)

    - #### public void addURL(URL url)

      * adds a URL to the classloader. * *

      Parameters:
        `url` - the new classpath element

    - #### public void clearAssertionStatus()

      Sets the default assertion status for this class loader to `false` and discards any package defaults or class assertion status settings associated with the class loader. This method is provided so that class loaders can be made to ignore any command line or persistent assertion status settings and "start with a clean slate."

      Since:
        1.4

    - #### public void clearCache()

      * Removes all classes from the class cache. *

      * In addition to internal caches this method also clears any * previously set MetaClass information for the given set of * classes being removed. * *

      See Also:
        *
        *
        removeClassCacheEntry(String)

    - #### public void close()

      * Closes this GroovyClassLoader and clears any caches it maintains. *

      * No use should be made of this instance after this method is * invoked. Any classes that are already loaded are still accessible. * *

      throws:
        IOException *
      See Also:
        *
        *
      Since:
        2.5.0

    - #### public Class defineClass(ClassNode classNode, String file, String newCodeBase)

      * Compiles the given `ClassNode` returning the resulting `Class`. *

      * WARNING: compilation is not synchronized

    - #### public Class defineClass(String name, byte[] b)

      * Converts an array of bytes into an instance of `Class`. Before the * class can be used it must be resolved.

    - #### public URL findResource(String name)

      Finds the resource with the specified name on the URL search path.

      Parameters:
        `name` - the name of the resource
      Returns:
        a `URL` for the resource, or `null` if the resource could not be found, or if the loader is closed.

    - #### public Enumeration<URL> findResources(String name)

      Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.

      throws:
        IOException if an I/O exception occurs
      Parameters:
        `name` - the resource name
      Returns:
        An `Enumeration` of `URL`s. If the loader is closed, the Enumeration contains no elements.

    - #### public String generateScriptName()

      * Generates a unique script name for unnamed parsed sources. * *

      Returns:
        a unique script name ending in `.groovy`

    - #### public Class[] getLoadedClasses()

      *

      Returns all Groovy classes loaded by this class loader. * *

      Returns:
        all classes loaded by this class loader

    - #### public URL getResource(String name)

      Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

      The name of a resource is a '`/`'-separated path name that identifies the resource.

      Resources in named modules are subject to the encapsulation rules specified by Module.getResourceAsStream. Additionally, and except for the special case where the resource has a name ending with "`.class`", this method will only find resources in packages of named modules when the package is opened unconditionally (even if the caller of this method is in the same module as the resource).

      throws:
        NullPointerException If `name` is `null`
      revised:
        9
      Implementation Requirements:
        The default implementation will first search the parent class loader for the resource; if the parent is `null` the path of the class loader built into the virtual machine is searched. If not found, this method will invoke findResource(String) to find the resource.
      API Note:
        Where several modules are defined to the same class loader, and where more than one module contains a resource with the given name, then the ordering that modules are searched is not specified and may be very unpredictable. When overriding this method it is recommended that an implementation ensures that any delegation is consistent with the getResources(java.lang.String) getResources(String) method.
      Parameters:
        `name` - The resource name
      Returns:
        `URL` object for reading the resource; `null` if the resource could not be found, a `URL` could not be constructed to locate the resource, the resource is in a package that is not opened unconditionally, or access to the resource is denied by the security manager.
      Since:
        1.1

    - #### public InputStream getResourceAsStream(String name)

      Returns an input stream for reading the specified resource. If this loader is closed, then any resources opened by this method will be closed.

      The search order is described in the documentation for getResource(String).

      throws:
        NullPointerException If `name` is `null`
      Parameters:
        `name` - The resource name
      Returns:
        An input stream for reading the resource, or `null` if the resource could not be found
      Since:
        1.7

    - #### public GroovyResourceLoader getResourceLoader()

      * Returns the resource loader used to resolve Groovy source by script name. * *

      Returns:
        the current resource loader

    - #### public Enumeration<URL> getResources(String name)

      Finds all the resources with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

      The name of a resource is a `/`-separated path name that identifies the resource.

      Resources in named modules are subject to the encapsulation rules specified by Module.getResourceAsStream. Additionally, and except for the special case where the resource has a name ending with "`.class`", this method will only find resources in packages of named modules when the package is opened unconditionally (even if the caller of this method is in the same module as the resource).

      throws:
        IOException If I/O errors occur
      throws:
        NullPointerException If `name` is `null`
      revised:
        9
      Implementation Requirements:
        The default implementation will first search the parent class loader for the resource; if the parent is `null` the path of the class loader built into the virtual machine is searched. It then invokes findResources(String) to find the resources with the name in this class loader. It returns an enumeration whose elements are the URLs found by searching the parent class loader followed by the elements found with `findResources`.
      API Note:
        Where several modules are defined to the same class loader, and where more than one module contains a resource with the given name, then the ordering is not specified and may be very unpredictable. When overriding this method it is recommended that an implementation ensures that any delegation is consistent with the getResource(java.lang.String) getResource(String) method. This should ensure that the first element returned by the Enumeration's `nextElement` method is the same resource that the `getResource(String)` method would return.
      Parameters:
        `name` - The resource name
      Returns:
        An enumeration of URL objects for the resource. If no resources could be found, the enumeration will be empty. Resources for which a `URL` cannot be constructed, are in a package that is not opened unconditionally, or access to the resource is denied by the security manager, are not returned in the enumeration.
      Since:
        1.2

    - #### public long getTimeStamp()

      Returns the creation timestamp of this inner loader.

      Returns:
        the timestamp captured when the loader was created

    - #### public URL[] getURLs()

      Returns the search path of URLs for loading classes and resources. This includes the original list of URLs specified to the constructor, along with any URLs subsequently appended by the addURL() method.

      Returns:
        the search path of URLs for loading classes and resources.

    - #### public Boolean isShouldRecompile()

      * gets the currently set recompilation mode. null means, the * compiler configuration is used. False means no recompilation and * true means that recompilation will be done if needed. * *

      Returns:
        the recompilation mode

    - #### public Class<?> loadClass(String name)

      * Loads the class with the specified binary name. This method searches for classes in the same manner as the loadClass(String, boolean) method. It is invoked by the Java virtual machine to resolve class references. Invoking this method is equivalent to invoking loadClass(name,.

      throws:
        ClassNotFoundException If the class was not found
      Parameters:
        `name` - The binary name of the class
      Returns:
        The resulting `Class` object
      * *
      See Also:
        ClassLoader#loadClass(java.lang.String,boolean)

    - #### public Class loadClass(String name, boolean lookupScriptFiles, boolean preferClassOverScript)

      * Loads a class from a file or a parent loader. This method delegates to: *

               * loadClass(name, lookupScriptFiles, preferClassOverScript, false);
               *

      * *
      throws:
        ClassNotFoundException if class could not be found *
      throws:
        CompilationFailedException if compilation of script failed

    - #### public Class loadClass(String name, boolean lookupScriptFiles, boolean preferClassOverScript, boolean resolve)

      * Loads a class from a file or a parent loader. * *

      throws:
        ClassNotFoundException if class could not be found *
      throws:
        CompilationFailedException if compilation of script failed
      Parameters:
        `name` - of the class to be loaded *
        `lookupScriptFiles` - if false no lookup at files is done at all *
        `preferClassOverScript` - if true the file lookup is only done if there is no class *
        `resolve` - see ClassLoader.loadClass *
      Returns:
        the class found or the class created from a file lookup *

    - #### public Class parseClass(File file)

      * Parses the given file into a Java class capable of being run * *

      Parameters:
        `file` - the file name to parse *
      Returns:
        the main class defined in the given script

    - #### public Class parseClass(GroovyCodeSource codeSource)

      * Parses Groovy source described by a GroovyCodeSource. * *

      throws:
        CompilationFailedException if compilation fails
      Parameters:
        `codeSource` - the code source to compile *
      Returns:
        the main class defined by the source *

    - #### public Class parseClass(GroovyCodeSource codeSource, boolean shouldCache)

      * Parses the given code source into a Java class. If there is a class file * for the given code source, then no parsing is done, instead the cached class is returned. * *

      Parameters:
        `shouldCacheSource` - if true then the generated class will be stored in the source cache *
      Returns:
        the main class defined in the given script

    - #### public Class parseClass(Reader reader, String fileName)

      * Parses Groovy source read from a Reader. * *

      throws:
        CompilationFailedException if compilation fails
      Parameters:
        `reader` - the reader supplying source text *
        `fileName` - the logical script name *
      Returns:
        the main class defined by the source *

    - #### public Class parseClass(String text)

      * Parses the given text into a Java class capable of being run * *

      Parameters:
        `text` - the text of the script/class to parse *
      Returns:
        the main class defined in the given script

    - #### public Class parseClass(String text, String fileName)

      * Parses the given text into a Java class capable of being run * *

      Parameters:
        `text` - the text of the script/class to parse *
        `fileName` - the file name to use as the name of the class *
      Returns:
        the main class defined in the given script

    - #### public void setClassAssertionStatus(String className, boolean enabled)

      Sets the desired assertion status for the named top-level class in this class loader and any nested classes contained therein. This setting takes precedence over the class loader's default assertion status, and over any applicable per-package default. This method has no effect if the named class has already been initialized. (Once a class is initialized, its assertion status cannot change.)

      If the named class is not a top-level class, this invocation will have no effect on the actual assertion status of any class.

      Parameters:
        `className` - The fully qualified class name of the top-level class whose assertion status is to be set.
        `enabled` - `true` if the named class is to have assertions enabled when (and if) it is initialized, `false` if the class is to have assertions disabled.
      Since:
        1.4

    - #### public void setDefaultAssertionStatus(boolean enabled)

      Sets the default assertion status for this class loader. This setting determines whether classes loaded by this class loader and initialized in the future will have assertions enabled or disabled by default. This setting may be overridden on a per-package or per-class basis by invoking setPackageAssertionStatus(String, boolean) or setClassAssertionStatus(String, boolean).

      Parameters:
        `enabled` - `true` if classes loaded by this class loader will henceforth have assertions enabled by default, `false` if they will have assertions disabled by default.
      Since:
        1.4

    - #### public void setPackageAssertionStatus(String packageName, boolean enabled)

      Sets the package default assertion status for the named package. The package default assertion status determines the assertion status for classes initialized in the future that belong to the named package or any of its "subpackages".

      A subpackage of a package named p is any package whose name begins with "`p.`". For example, `javax.swing.text` is a subpackage of `javax.swing`, and both `java.util` and `java.lang.reflect` are subpackages of `java`.

      In the event that multiple package defaults apply to a given class, the package default pertaining to the most specific package takes precedence over the others. For example, if `javax.lang` and `javax.lang.reflect` both have package defaults associated with them, the latter package default applies to classes in `javax.lang.reflect`.

      Package defaults take precedence over the class loader's default assertion status, and may be overridden on a per-class basis by invoking setClassAssertionStatus(String, boolean).

      Parameters:
        `packageName` - The name of the package whose package default assertion status is to be set. A `null` value indicates the unnamed package that is "current" (see section {@jls 7.4.2} of The Java Language Specification.)
        `enabled` - `true` if classes loaded by this classloader and belonging to the named package or any of its subpackages will have assertions enabled by default, `false` if they will have assertions disabled by default.
      Since:
        1.4

    - #### public void setResourceLoader(GroovyResourceLoader resourceLoader)

      * Sets the resource loader used to resolve Groovy source by script name. * *

      Parameters:
        `resourceLoader` - the resource loader to use

    - #### public void setShouldRecompile(Boolean mode)

      * sets if the recompilation should be enabled. There are 3 possible * values for this. Any value different from null overrides the * value from the compiler configuration. true means to recompile if needed * false means to never recompile. * *

      Parameters:
        `mode` - the recompilation mode *
      See Also:
        CompilerConfiguration