org.keycloak.connections.jpa.entityprovider

## Class ProxyClassLoader

- java.lang.Object
- - java.lang.ClassLoader
  - - org.keycloak.connections.jpa.entityprovider.ProxyClassLoader

-     public class ProxyClassLoader
      extends ClassLoader

  Author:
    Erik Mulder Classloader implementation to facilitate loading classes and resources from a collection of other classloaders. Effectively it forms a proxy to one or more other classloaders. The way it works: - Get all (unique) classloaders from all provided classes - For each class or resource that is 'requested': - First try all provided classloaders and if we have a match, return that - If no match was found: proceed with 'normal' classloading in 'current classpath' scope In this particular context: only loadClass and getResource overrides are needed, since those are the methods that a classloading and resource loading process will need.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProxyClassLoader(Collection<Class<?>> classes)`
    `ProxyClassLoader(Collection<Class<?>> classes, ClassLoader parentClassLoader)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `URL` | `getResource(String name)`
    `Class<?>` | `loadClass(String name)`

    - ### Methods inherited from class java.lang.ClassLoader

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

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

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

- - ### Constructor Detail

    - #### ProxyClassLoader

          public ProxyClassLoader(Collection<Class<?>> classes,
                                  ClassLoader parentClassLoader)

    - #### ProxyClassLoader

          public ProxyClassLoader(Collection<Class<?>> classes)

  - ### Method Detail

    - #### loadClass

          public Class<?> loadClass(String name)
                             throws ClassNotFoundException

      Overrides:
        `loadClass` in class `ClassLoader`
      Throws:
        `ClassNotFoundException`

    - #### getResource

          public URL getResource(String name)

      Overrides:
        `getResource` in class `ClassLoader`

Copyright © 2016 JBoss by Red Hat. All rights reserved.