Class ConfigOwner
java.lang.Object
com.ultikits.ultitools.config.ConfigOwner
Configuration capabilities of one host. Registries compare its token by identity, not by name.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Supplier<PluginCodeSource> private final Objectprivate final Stringprivate final Supplier<Optional<ModuleTexts>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConfigOwner(Object key, String kindLabel, Supplier<String> name, Supplier<File> configFolder, Supplier<Optional<ModuleTexts>> texts, Function<String, File> configFile, Supplier<PluginCodeSource> codeSource) -
Method Summary
Modifier and TypeMethodDescription@Nullable PluginCodeSourceconfigFile(String path) static ConfigOwnerforExternal(ExternalPluginAdapter adapter, @Nullable ModuleTexts texts, @Nullable PluginCodeSource source) Uses the external host's adapter identity and the source already resolved by assembly.static ConfigOwnerforModule(UltiToolsPlugin module, Function<String, File> configFile) Adapts a module without changing its legacy file resolution or the lifetime of its text catalogue.(package private) static ConfigOwnerBuilds a view over the host's existing token and configuration directory.key()name()texts()
-
Field Details
-
key
-
kindLabel
-
name
-
configFolder
-
texts
-
configFile
-
codeSource
-
-
Constructor Details
-
ConfigOwner
-
-
Method Details
-
forModule
Adapts a module without changing its legacy file resolution or the lifetime of its text catalogue. -
forPlugin
static ConfigOwner forPlugin(Object token, String name, File folder, Supplier<Optional<ModuleTexts>> texts) Builds a view over the host's existing token and configuration directory. Does not attach the host. -
forExternal
public static ConfigOwner forExternal(ExternalPluginAdapter adapter, @Nullable @Nullable ModuleTexts texts, @Nullable @Nullable PluginCodeSource source) Uses the external host's adapter identity and the source already resolved by assembly. -
key
-
name
-
kindLabel
-
configFolder
-
texts
-
configFile
-
codeSource
- Returns:
- the host's own discovery root, or null when the host has no local source
-
diagnosticLabel
-