Class

polynote.kernel.util

LimitedSharingClassLoader

Related Doc: package util

Permalink

class LimitedSharingClassLoader extends URLClassLoader

A ClassLoader that delegates only certain classes to the parent, based on a regular expression. This is useful for creating an isolated class loader which shares some necessary classes (i.e. java and scala libraries) with the root class loader, so that instances of those classes can be freely used by isolated classes.

Resource loading behavior is not changed from a standard class loader (TODO?)

Linear Supertypes
URLClassLoader, HasClassPath, ScalaClassLoader, URLClassLoader, Closeable, AutoCloseable, SecureClassLoader, ClassLoader, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LimitedSharingClassLoader
  2. URLClassLoader
  3. HasClassPath
  4. ScalaClassLoader
  5. URLClassLoader
  6. Closeable
  7. AutoCloseable
  8. SecureClassLoader
  9. ClassLoader
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LimitedSharingClassLoader(shareRegex: String, urls: Seq[URL], parent: ClassLoader)

    Permalink

    shareRegex

    Regular expression matching which classes to share. Any class whose full name matches this expression will be delegated to the parent.

    urls

    URLs representing the classpath

    parent

    The parent ClassLoader

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addURL(url: URL): Unit

    Permalink
    Definition Classes
    URLClassLoader → URLClassLoader
  5. def asContext[T](action: ⇒ T): T

    Permalink
    Definition Classes
    ScalaClassLoader
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def classAsStream(className: String): InputStream

    Permalink
    Definition Classes
    ScalaClassLoader
  8. def classBytes(className: String): Array[Byte]

    Permalink
    Definition Classes
    ScalaClassLoader
  9. def classPathURLs: Seq[URL]

    Permalink
    Definition Classes
    URLClassLoader → HasClassPath
  10. def clearAssertionStatus(): Unit

    Permalink
    Definition Classes
    ClassLoader
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def close(): Unit

    Permalink
    Definition Classes
    URLClassLoader → Closeable → AutoCloseable
    Annotations
    @throws( classOf[java.io.IOException] )
  13. def create(path: String): AnyRef

    Permalink
    Definition Classes
    ScalaClassLoader
  14. final def defineClass(arg0: String, arg1: ByteBuffer, arg2: CodeSource): Class[_]

    Permalink
    Attributes
    protected[java.security]
    Definition Classes
    SecureClassLoader
  15. final def defineClass(arg0: String, arg1: Array[Byte], arg2: Int, arg3: Int, arg4: CodeSource): Class[_]

    Permalink
    Attributes
    protected[java.security]
    Definition Classes
    SecureClassLoader
  16. final def defineClass(arg0: String, arg1: ByteBuffer, arg2: ProtectionDomain): Class[_]

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
    Annotations
    @throws( classOf[java.lang.ClassFormatError] )
  17. final def defineClass(arg0: String, arg1: Array[Byte], arg2: Int, arg3: Int, arg4: ProtectionDomain): Class[_]

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
    Annotations
    @throws( classOf[java.lang.ClassFormatError] )
  18. final def defineClass(arg0: String, arg1: Array[Byte], arg2: Int, arg3: Int): Class[_]

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
    Annotations
    @throws( classOf[java.lang.ClassFormatError] )
  19. def definePackage(arg0: String, arg1: Manifest, arg2: URL): Package

    Permalink
    Attributes
    protected[java.net]
    Definition Classes
    URLClassLoader
    Annotations
    @throws( ... )
  20. def definePackage(arg0: String, arg1: String, arg2: String, arg3: String, arg4: String, arg5: String, arg6: String, arg7: URL): Package

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
    Annotations
    @throws( ... )
  21. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def findClass(arg0: String): Class[_]

    Permalink
    Attributes
    protected[java.net]
    Definition Classes
    URLClassLoader → ClassLoader
    Annotations
    @throws( ... )
  25. def findLibrary(arg0: String): String

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
  26. final def findLoadedClass(arg0: String): Class[_]

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
  27. def findResource(arg0: String): URL

    Permalink
    Definition Classes
    URLClassLoader → ClassLoader
  28. def findResources(arg0: String): Enumeration[URL]

    Permalink
    Definition Classes
    URLClassLoader → ClassLoader
    Annotations
    @throws( classOf[java.io.IOException] )
  29. final def findSystemClass(arg0: String): Class[_]

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
    Annotations
    @throws( ... )
  30. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  31. def getClassLoadingLock(arg0: String): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
  32. def getPackage(arg0: String): Package

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
  33. def getPackages(): Array[Package]

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
  34. final def getParent(): ClassLoader

    Permalink
    Definition Classes
    ClassLoader
    Annotations
    @CallerSensitive()
  35. def getPermissions(arg0: CodeSource): PermissionCollection

    Permalink
    Attributes
    protected[java.net]
    Definition Classes
    URLClassLoader → SecureClassLoader
  36. def getResource(arg0: String): URL

    Permalink
    Definition Classes
    ClassLoader
  37. def getResourceAsStream(arg0: String): InputStream

    Permalink
    Definition Classes
    URLClassLoader → ClassLoader
  38. def getResources(arg0: String): Enumeration[URL]

    Permalink
    Definition Classes
    ClassLoader
    Annotations
    @throws( classOf[java.io.IOException] )
  39. def getURLs(): Array[URL]

    Permalink
    Definition Classes
    URLClassLoader
  40. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  41. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  42. def loadClass(name: String, resolve: Boolean): Class[_]

    Permalink
    Definition Classes
    LimitedSharingClassLoader → ClassLoader
  43. def loadClass(arg0: String): Class[_]

    Permalink
    Definition Classes
    ClassLoader
    Annotations
    @throws( ... )
  44. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  45. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  46. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  47. final def resolveClass(arg0: Class[_]): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
  48. def run(objectName: String, arguments: Seq[String]): Unit

    Permalink
    Definition Classes
    ScalaClassLoader
  49. def setAsContext(): Unit

    Permalink
    Definition Classes
    ScalaClassLoader
  50. def setClassAssertionStatus(arg0: String, arg1: Boolean): Unit

    Permalink
    Definition Classes
    ClassLoader
  51. def setDefaultAssertionStatus(arg0: Boolean): Unit

    Permalink
    Definition Classes
    ClassLoader
  52. def setPackageAssertionStatus(arg0: String, arg1: Boolean): Unit

    Permalink
    Definition Classes
    ClassLoader
  53. final def setSigners(arg0: Class[_], arg1: Array[AnyRef]): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
  54. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  55. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  56. def tryToInitializeClass[T <: AnyRef](path: String): Option[Class[T]]

    Permalink
    Definition Classes
    ScalaClassLoader
  57. def tryToLoadClass[T <: AnyRef](path: String): Option[Class[T]]

    Permalink
    Definition Classes
    ScalaClassLoader
  58. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. final def defineClass(arg0: Array[Byte], arg1: Int, arg2: Int): Class[_]

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    ClassLoader
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.ClassFormatError] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from URLClassLoader

Inherited from HasClassPath

Inherited from ScalaClassLoader

Inherited from URLClassLoader

Inherited from Closeable

Inherited from AutoCloseable

Inherited from SecureClassLoader

Inherited from ClassLoader

Inherited from AnyRef

Inherited from Any

Ungrouped