Package org.apache.tapestry5.internal.plastic

## Class PlasticClassLoader

- java.lang.Object
- - java.lang.ClassLoader
  - - org.apache.tapestry5.internal.plastic.PlasticClassLoader

-     public class PlasticClassLoader
      extends java.lang.ClassLoader

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PlasticClassLoader​(java.lang.ClassLoader parent, ClassLoaderDelegate delegate)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Class<?>` | `defineClassWithBytecode​(java.lang.String className, byte[] bytecode)` |
    `protected java.lang.Class<?>` | `loadClass​(java.lang.String name, boolean resolve)` |
    `void` | `setAlternativeClassloading​(java.util.function.Function<java.lang.String,​java.lang.Class<?>> alternateClassloading)` | When alternatingClassloader is set, this classloader delegates to it the call to ClassLoader.loadClass(String).
    `void` | `setFilter​(java.util.function.Predicate<java.lang.String> filter)` | When a filter is set, only classes accepted by it will be loaded by this classloader.
    `void` | `setTag​(java.lang.String tag)` |
    `java.lang.String` | `toString()` |

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

      `clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

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

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

- - ### Constructor Detail

    - #### PlasticClassLoader

          public PlasticClassLoader​(java.lang.ClassLoader parent,
                                    ClassLoaderDelegate delegate)

  - ### Method Detail

    - #### loadClass

          protected java.lang.Class<?> loadClass​(java.lang.String name,
                                                 boolean resolve)
                                          throws java.lang.ClassNotFoundException

      Overrides:
        `loadClass` in class `java.lang.ClassLoader`
      Throws:
        `java.lang.ClassNotFoundException`

    - #### defineClassWithBytecode

          public java.lang.Class<?> defineClassWithBytecode​(java.lang.String className,
                                                            byte[] bytecode)

    - #### setAlternativeClassloading

          public void setAlternativeClassloading​(java.util.function.Function<java.lang.String,​java.lang.Class<?>> alternateClassloading)

      When alternatingClassloader is set, this classloader delegates to it the call to ClassLoader.loadClass(String). If it returns a non-null object, it's returned by `loadClass(String)`. Otherwise, it returns `super.loadClass(name)`.
      Since:
        5.8.3

    - #### setTag

          public void setTag​(java.lang.String tag)

      Since:
        5.8.3

    - #### setFilter

          public void setFilter​(java.util.function.Predicate<java.lang.String> filter)

      When a filter is set, only classes accepted by it will be loaded by this classloader. Instead, it will be delegated to alternate classloading first and the parent classloader in case the alternate doesn't handle it.
      Since:
        5.8.3

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`