Class PluginManager.Builder
java.lang.Object
cloud.opencode.base.classloader.plugin.PluginManager.Builder
- Enclosing class:
PluginManager
Builder for PluginManager
PluginManager 构建器
- Since:
- JDK 25, opencode-base-classloader V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the PluginManager 构建 PluginManagerleakDetection(LeakDetection leakDetection) Set the leak detection level for plugin ClassLoaders 设置插件 ClassLoader 的泄漏检测级别loadingStrategy(IsoClassLoader.LoadingStrategy loadingStrategy) Set the class loading strategy for plugin ClassLoaders 设置插件 ClassLoader 的类加载策略Set the plugin directory to scan for JAR files 设置用于扫描 JAR 文件的插件目录policy(ClassLoadingPolicy policy) Set the class loading policy for plugin ClassLoaders 设置插件 ClassLoader 的类加载策略
-
Method Details
-
pluginDir
Set the plugin directory to scan for JAR files 设置用于扫描 JAR 文件的插件目录- Parameters:
pluginDir- plugin directory path | 插件目录路径- Returns:
- this builder | 此构建器
- Throws:
NullPointerException- if pluginDir is null | 当 pluginDir 为 null 时
-
loadingStrategy
Set the class loading strategy for plugin ClassLoaders 设置插件 ClassLoader 的类加载策略- Parameters:
loadingStrategy- the loading strategy | 加载策略- Returns:
- this builder | 此构建器
- Throws:
NullPointerException- if loadingStrategy is null | 当 loadingStrategy 为 null 时
-
leakDetection
Set the leak detection level for plugin ClassLoaders 设置插件 ClassLoader 的泄漏检测级别- Parameters:
leakDetection- the leak detection level | 泄漏检测级别- Returns:
- this builder | 此构建器
- Throws:
NullPointerException- if leakDetection is null | 当 leakDetection 为 null 时
-
policy
Set the class loading policy for plugin ClassLoaders 设置插件 ClassLoader 的类加载策略- Parameters:
policy- the class loading policy | 类加载策略- Returns:
- this builder | 此构建器
- Throws:
NullPointerException- if policy is null | 当 policy 为 null 时
-
build
Build the PluginManager 构建 PluginManager- Returns:
- a new PluginManager instance | 新的 PluginManager 实例
- Throws:
OpenClassLoaderException- if pluginDir is not set | 当 pluginDir 未设置时
-