SnippetLoader

The whole snippet chain in ONE hop: game-identity names to the game loader, the rest to masking, and only a miss in both retries a hybrid server's plugins (PluginBridge). One loader, not one per concern: every snippet class load walks this, and each level costs a lock + findLoadedClass.

Plugins stay last (so MC/mods/org.bukkit.* keep the server's identity, not a shaded copy) and out of loadClass, whose compiler lookups miss by design.

Constructors

Link copied to clipboard
constructor(masking: MaskingClassLoader, game: ClassLoader, redirectKotlin: Boolean)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private val classes: ArrayList<Class<out Any>>
Link copied to clipboard
private open var classLoaderValueMap: ConcurrentHashMap<out Any, out Any>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private val game: ClassLoader
Link copied to clipboard
private val libraries: NativeLibraries
Link copied to clipboard
Link copied to clipboard
private val nameAndId: String
Link copied to clipboard
private val nocerts: Array<Certificate>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private val redirectKotlin: Boolean
Link copied to clipboard
private open var scl: ClassLoader
Link copied to clipboard

Functions

Link copied to clipboard
open fun addClass(c: Class<out Any>)
Link copied to clipboard
Link copied to clipboard
protected fun defineClass(b: Array<Byte>, off: Int, len: Int): Class<out Any>
Link copied to clipboard
open fun defineClass0(p: ClassLoader, p1: Class<out Any>, p2: String, p3: Array<Byte>, p4: Int, p5: Int, p6: ProtectionDomain, p7: Boolean, p8: Int, p9: Any): Class<out Any>
Link copied to clipboard
open fun defineClass1(p: ClassLoader, p1: String, p2: Array<Byte>, p3: Int, p4: Int, p5: ProtectionDomain, p6: String): Class<out Any>
Link copied to clipboard
open fun defineClass2(p: ClassLoader, p1: String, p2: ByteBuffer, p3: Int, p4: Int, p5: ProtectionDomain, p6: String): Class<out Any>
Link copied to clipboard
open fun definePackage(c: Class<out Any>): Package
Link copied to clipboard
open fun desiredAssertionStatus(className: String): Boolean
Link copied to clipboard
open fun findBootstrapClassOrNull(name: String): Class<out Any>
Link copied to clipboard
protected open fun findClass(name: String): Class<out Any>
Link copied to clipboard
protected open fun findLibrary(libname: String): String
Link copied to clipboard
protected fun findLoadedClass(name: String): Class<out Any>
Link copied to clipboard
open fun findNative(loader: ClassLoader, clazz: Class<out Any>, entryName: String, javaName: String): Long
Link copied to clipboard
protected open fun findResource(moduleName: String, name: String): URL
Link copied to clipboard
protected open fun findResources(name: String): Enumeration<URL>
Link copied to clipboard
protected fun findSystemClass(name: String): Class<out Any>
Link copied to clipboard
private open fun gameIdentity(n: String): Boolean
Names that must be the GAME's copy, or a snippet value is a different class at the seam → LinkageError.
Link copied to clipboard
Link copied to clipboard
open fun getClassLoader(caller: Class<out Any>): ClassLoader
Link copied to clipboard
protected open fun getClassLoadingLock(className: String): Any
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected open fun getPackage(name: String): Package
Link copied to clipboard
protected open fun getPackages(): Array<Package>
Link copied to clipboard
Link copied to clipboard
open fun getResource(name: String): URL
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getSystemResource(name: String): URL
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private open fun load(name: String): Class<out Any>
Two shapes mean "not mine": the ordinary ClassNotFoundException, and a CLOSED loader — Bukkit closes a plugin's the moment its onDisable returns, and Paper's then report the shut jar from findClass as an IllegalStateException, which nothing downstream catches (not its own libraryLoader fallback either).
Link copied to clipboard
open fun loadClass(name: String): Class<out Any>
protected open fun loadClass(name: String, resolve: Boolean): Class<out Any>
Link copied to clipboard
open fun loadLibrary(fromClass: Class<out Any>, file: File): NativeLibrary
Link copied to clipboard
fun name(): String
Link copied to clipboard
open fun nameAndId(): String
Link copied to clipboard
open fun nativeLibrariesFor(loader: ClassLoader): NativeLibraries
Link copied to clipboard
open fun packages(): Stream<Package>
Link copied to clipboard
protected open fun registerAsParallelCapable(): Boolean
Link copied to clipboard
protected fun resolveClass(c: Class<out Any>)
Link copied to clipboard
open fun resources(name: String): Stream<URL>
Link copied to clipboard
open fun setClassAssertionStatus(className: String, enabled: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun setPackageAssertionStatus(packageName: String, enabled: Boolean)
Link copied to clipboard
protected fun setSigners(c: Class<out Any>, signers: Array<Any>)