org.springframework.instrument.classloading

## 类 ResourceOverridingShadowingClassLoader

- java.lang.Object
- - java.lang.ClassLoader
  - - org.springframework.core.DecoratingClassLoader
    - - org.springframework.instrument.classloading.ShadowingClassLoader
      - - org.springframework.instrument.classloading.ResourceOverridingShadowingClassLoader

-     public class ResourceOverridingShadowingClassLoader
      extends ShadowingClassLoader

  Subclass of ShadowingClassLoader that overrides attempts to locate certain files.
  从以下版本开始:
    2.0
  作者:
    Rod Johnson, Adrian Colyer

- - ### 字段概要

    - ### 从类继承的字段 org.springframework.instrument.classloading.ShadowingClassLoader

      `DEFAULT_EXCLUDED_PACKAGES`

  - ### 构造器概要

    构造器
    构造器和说明
    `ResourceOverridingShadowingClassLoader(ClassLoader enclosingClassLoader)` Create a new ResourceOverridingShadowingClassLoader, decorating the given ClassLoader.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `copyOverrides(ResourceOverridingShadowingClassLoader other)` Copy all overrides from the given ClassLoader.
    `URL` | `getResource(String requestedPath)`
    `InputStream` | `getResourceAsStream(String requestedPath)`
    `Enumeration<URL>` | `getResources(String requestedPath)`
    `void` | `override(String oldPath, String newPath)` Return the resource (if any) at the new path on an attempt to locate a resource at the old path.
    `void` | `suppress(String oldPath)` Ensure that a resource with the given path is not found.

    - ### 从类继承的方法 org.springframework.instrument.classloading.ShadowingClassLoader

      `addTransformer, copyTransformers, isEligibleForShadowing, loadClass`

    - ### 从类继承的方法 org.springframework.core.DecoratingClassLoader

      `excludeClass, excludePackage, isExcluded`

    - ### 从类继承的方法 java.lang.ClassLoader

      `clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### ResourceOverridingShadowingClassLoader

          public ResourceOverridingShadowingClassLoader(ClassLoader enclosingClassLoader)

      Create a new ResourceOverridingShadowingClassLoader, decorating the given ClassLoader.
      参数:
        `enclosingClassLoader` - the ClassLoader to decorate

  - ### 方法详细资料

    - #### override

          public void override(String oldPath,
                               String newPath)

      Return the resource (if any) at the new path on an attempt to locate a resource at the old path.
      参数:
        `oldPath` - the path requested
        `newPath` - the actual path to be looked up

    - #### suppress

          public void suppress(String oldPath)

      Ensure that a resource with the given path is not found.
      参数:
        `oldPath` - the path of the resource to hide even if it exists in the parent ClassLoader

    - #### copyOverrides

          public void copyOverrides(ResourceOverridingShadowingClassLoader other)

      Copy all overrides from the given ClassLoader.
      参数:
        `other` - the other ClassLoader to copy from

    - #### getResource

          public URL getResource(String requestedPath)

      覆盖:
        `getResource` 在类中 `ShadowingClassLoader`

    - #### getResourceAsStream

          @Nullable
          public InputStream getResourceAsStream(String requestedPath)

      覆盖:
        `getResourceAsStream` 在类中 `ShadowingClassLoader`

    - #### getResources

          public Enumeration<URL> getResources(String requestedPath)
                                        throws IOException

      覆盖:
        `getResources` 在类中 `ShadowingClassLoader`
      抛出:
        `IOException`