Record Class PluginRegistry
java.lang.Object
java.lang.Record
me.pauleff.converter.PluginRegistry
- Record Components:
discoveryPlugins- read-only / detection plugins that run before files are changedmiscPlugins- mutating plugins that can run for any server type after confirmationconversionPlugins- server-type-specific world conversion plugins
public record PluginRegistry(List<MOOCPlugin> discoveryPlugins, List<MOOCPlugin> miscPlugins, List<MOOCPlugin> conversionPlugins)
extends Record
Holds the ordered plugin lists used for discovery, misc, and conversion phases.
Construction validates unique plugin ids and sorts each list by
PluginMetadata.priority() (lower first), preserving registration order
for equal priorities. standard() supplies the built-in plugin set.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPluginRegistry(List<MOOCPlugin> discoveryPlugins, List<MOOCPlugin> miscPlugins, List<MOOCPlugin> conversionPlugins) Validates non-null plugin lists, rejects duplicate plugin ids, and replaces each list with an immutable copy sorted by priority then registration order. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconversionPluginsrecord component.Returns the value of thediscoveryPluginsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themiscPluginsrecord component.static PluginRegistrystandard()Returns the built-in registry of discovery, misc, and conversion plugins.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PluginRegistry
public PluginRegistry(List<MOOCPlugin> discoveryPlugins, List<MOOCPlugin> miscPlugins, List<MOOCPlugin> conversionPlugins) Validates non-null plugin lists, rejects duplicate plugin ids, and replaces each list with an immutable copy sorted by priority then registration order.- Throws:
NullPointerException- if any plugin list isnullIllegalArgumentException- if two plugins share the samePluginMetadata.id()
-
-
Method Details
-
standard
Returns the built-in registry of discovery, misc, and conversion plugins.- Returns:
- a
PluginRegistrycontaining the standard plugin set
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
discoveryPlugins
Returns the value of thediscoveryPluginsrecord component.- Returns:
- the value of the
discoveryPluginsrecord component
-
miscPlugins
Returns the value of themiscPluginsrecord component.- Returns:
- the value of the
miscPluginsrecord component
-
conversionPlugins
Returns the value of theconversionPluginsrecord component.- Returns:
- the value of the
conversionPluginsrecord component
-