Package: org.grails.spring.context.annotation

## [Java] Class ClosureClassIgnoringComponentScanBeanDefinitionParser.ParentOnlyGetResourcesClassLoader

- org.grails.spring.context.annotation.ClosureClassIgnoringComponentScanBeanDefinitionParser.ParentOnlyGetResourcesClassLoader

-     private static final class ClosureClassIgnoringComponentScanBeanDefinitionParser.ParentOnlyGetResourcesClassLoader
      extends java.lang.ClassLoader

  This ClassLoader is used to restrict getResources & getResource methods only to the parent ClassLoader. getResources/getResource usually search all parent level classloaders. (look at details in source code of java.lang.ClassLoader.getResources)

  Authors:
    Lari Hotari

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.lang.reflect.Method` | `findResourceMethod` |
    `private java.lang.reflect.Method` | `findResourcesMethod` |
    `private java.lang.ClassLoader` | `rootLoader` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ParentOnlyGetResourcesClassLoader (java.lang.ClassLoader parent)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `private java.net.URL` | `findResourceRecursive(java.lang.ClassLoader parent, java.lang.String name)`
    `` | `private void` | `findResourcesRecursive(java.lang.ClassLoader parent, java.lang.String name, java.util.Collection<java.net.URL> urls)`
    `` | `public java.net.URL` | `getResource(java.lang.String name)`
    `` | `public java.util.Enumeration<java.net.URL>` | `getResources(java.lang.String name)`
    `` | `private java.net.URL` | `invokeFindResource(java.lang.ClassLoader parent, java.lang.String name)`
    `` | `private java.util.Enumeration<java.net.URL>` | `invokeFindResources(java.lang.ClassLoader parent, java.lang.String name)`

  - ### Inherited Methods Summary

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

- - ### Field Detail

    - #### private final java.lang.reflect.Method findResourceMethod

    - #### private final java.lang.reflect.Method findResourcesMethod

    - #### private java.lang.ClassLoader rootLoader

  - ### Constructor Detail

    - #### public ParentOnlyGetResourcesClassLoader(java.lang.ClassLoader parent)

  - ### Method Detail

    - #### private java.net.URL findResourceRecursive(java.lang.ClassLoader parent, java.lang.String name)

    - #### private void findResourcesRecursive(java.lang.ClassLoader parent, java.lang.String name, java.util.Collection<java.net.URL> urls)

    - #### @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)

    - #### private java.net.URL invokeFindResource(java.lang.ClassLoader parent, java.lang.String name)

    - #### @java.lang.SuppressWarnings("unchecked") private java.util.Enumeration<java.net.URL> invokeFindResources(java.lang.ClassLoader parent, java.lang.String name)