Package org.apache.tapestry5.internal.plastic

# Class PlasticClassLoader

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

public class PlasticClassLoader extends ClassLoader

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PlasticClassLoader(ClassLoader parent, ClassLoaderDelegate delegate)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Class<?>`
  `defineClassWithBytecode(String className, byte[] bytecode)`
  `String`
  `getClassLoaderId()`
  `protected Class<?>`
  `loadClass(String name, boolean resolve)`
  `void`
  `setAlternativeClassloading(Function<String,Class<?>> alternateClassloading)`
  When alternatingClassloader is set, this classloader delegates to it the call to ClassLoader.loadClass(String).
  `void`
  `setFilter(Predicate<String> filter)`
  When a filter is set, only classes accepted by it will be loaded by this classloader.
  `void`
  `setTag(String tag)`
  `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 Details

  - ### PlasticClassLoader

    public PlasticClassLoader(ClassLoader parent, ClassLoaderDelegate delegate)

- ## Method Details

  - ### loadClass

    protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
    Overrides:
      `loadClass` in class `ClassLoader`
    Throws:
      `ClassNotFoundException`

  - ### defineClassWithBytecode

    public Class<?> defineClassWithBytecode(String className, byte[] bytecode)

  - ### setAlternativeClassloading

    public void setAlternativeClassloading(Function<String,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(String tag)
    Since:
      5.8.3

  - ### setFilter

    public void setFilter(Predicate<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 String toString()
    Overrides:
      `toString` in class `Object`

  - ### getClassLoaderId

    public String getClassLoaderId()