ClassRelativeClassLoader (Grails 6.0.0)

Package: org.grails.core.support.internal.tools

## [Java] Class ClassRelativeClassLoader

- org.grails.core.support.internal.tools.ClassRelativeClassLoader

-     class ClassRelativeClassLoader
      extends java.net.URLClassLoader

  A classloader that only finds resources and classes that are in the same jar as the given class For internal use only

  Authors:
    Graeme Rocher
  Since:
    3.1.13

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `int` | `i` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ClassRelativeClassLoader (java.lang.Class targetClass)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `private static java.net.URL[]` | `createClassLoaderUrls(java.lang.Class targetClass)`
    `` | `public java.net.URL` | `getResource(java.lang.String name)`
    `` | `public java.util.Enumeration<java.net.URL>` | `getResources(java.lang.String name)`
    `` | `public boolean` | `hasMoreElements()`
    `` | `public java.net.URL` | `nextElement()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.net.URLClassLoader` | `java.net.URLClassLoader#getURLs(), java.net.URLClassLoader#newInstance([Ljava.net.URL;, java.lang.ClassLoader), java.net.URLClassLoader#newInstance([Ljava.net.URL;), java.net.URLClassLoader#getResourceAsStream(java.lang.String), java.net.URLClassLoader#findResource(java.lang.String), java.net.URLClassLoader#findResources(java.lang.String), java.net.URLClassLoader#close(), java.net.URLClassLoader#loadClass(java.lang.String), java.net.URLClassLoader#getPlatformClassLoader(), java.net.URLClassLoader#getSystemClassLoader(), java.net.URLClassLoader#getName(), java.net.URLClassLoader#getResource(java.lang.String), java.net.URLClassLoader#getSystemResourceAsStream(java.lang.String), java.net.URLClassLoader#getSystemResource(java.lang.String), java.net.URLClassLoader#getResources(java.lang.String), java.net.URLClassLoader#resources(java.lang.String), java.net.URLClassLoader#isRegisteredAsParallelCapable(), java.net.URLClassLoader#getSystemResources(java.lang.String), java.net.URLClassLoader#getParent(), java.net.URLClassLoader#getUnnamedModule(), java.net.URLClassLoader#getDefinedPackage(java.lang.String), java.net.URLClassLoader#getDefinedPackages(), java.net.URLClassLoader#setDefaultAssertionStatus(boolean), java.net.URLClassLoader#setPackageAssertionStatus(java.lang.String, boolean), java.net.URLClassLoader#setClassAssertionStatus(java.lang.String, boolean), java.net.URLClassLoader#clearAssertionStatus(), java.net.URLClassLoader#wait(long), java.net.URLClassLoader#wait(long, int), java.net.URLClassLoader#wait(), java.net.URLClassLoader#equals(java.lang.Object), java.net.URLClassLoader#toString(), java.net.URLClassLoader#hashCode(), java.net.URLClassLoader#getClass(), java.net.URLClassLoader#notify(), java.net.URLClassLoader#notifyAll()`

- - ### Field Detail

    - #### int i

  - ### Constructor Detail

    - #### public ClassRelativeClassLoader(java.lang.Class targetClass)

  - ### Method Detail

    - #### private static java.net.URL[] createClassLoaderUrls(java.lang.Class targetClass)

    - #### @java.lang.Override public java.net.URL getResource(java.lang.String name)

    - #### @java.lang.Override public java.util.Enumeration<java.net.URL> getResources(java.lang.String name)

    - #### @java.lang.Override public boolean hasMoreElements()

    - #### @java.lang.Override public java.net.URL nextElement()