bee
PriorityClassLoader
A ClassLoader that provides fine-grained control over class loading delegation.
- Allows specifying "high-priority" classes loaded child-first from its own URLs.
- Allows specifying "isolated" package prefixes (e.g., "bee.isolated.") whose classes are always loaded by this loader, even if present in the parent. If the class bytecode is not found in this loader's URLs, it attempts to fetch the bytecode from the parent/system and define it within this loader.
- For all other classes, it follows the standard parent-first delegation model.
PriorityClassLoader(UserInterfaceui)
UserInterfaceui)UserInterfaceui |
Constructs an empty PriorityClassLoader.
loadClass(Stringname, booleanresolve)Class?
Stringname, booleanresolve)?Stringname |
The binary name of the class to load. |
booleanresolve |
If |
Class |
The resulting |
ClassNotFoundException |
Loads the class with the specified binary name according to the priority/isolation rules.
addClassPath(psychopath.Locationlocation)PriorityClassLoader
psychopath.Locationlocation)psychopath.Locationlocation |
The location to be added (your custom type). |
PriorityClassLoader |
This |
Adds the specified location (JAR file or class directory) to the classpath.
Uses the custom Location type.
importAsPriorityClass(Class?target)PriorityClassLoader
Class?target)Classtarget |
The target class to be defined with high priority. |
PriorityClassLoader |
This |
Defines and potentially loads the specified class with high priority.
The class bytecode is retrieved as a resource using the system class loader. The class name is added to the high-priority set. This method attempts to define the class within this class loader.