类 BaseRegistry

java.lang.Object
pkg.exoad.poprock.core.registry.BaseRegistry
所有已实现的接口:
ITypeInferencing<Collection<Class<? extends RegistryEntry>>>
直接已知子类:
EphemeralRegistry, ExternRegistry, WeakRegistry

public abstract sealed class BaseRegistry extends Object implements ITypeInferencing<Collection<Class<? extends RegistryEntry>>> permits ExternRegistry, EphemeralRegistry, WeakRegistry
This is the root class used by all of the various implementations of a Registry. Registries are meant to be collatable groups of properties.
作者:
Jack Meng
  • 构造器详细资料

    • BaseRegistry

      protected BaseRegistry()
  • 方法详细资料

    • registerEntry

      abstract void registerEntry(String name, RegistryEntry entry)
      This method is the main entry into "putting" a leaf into a registry. It acts similar to the registration process used by EventPoolService.
      参数:
      name - The name of the leaf
      entry - The base modal of the leaf (property)
      另请参阅:
    • acquireEntryCanonicalName

      public String acquireEntryCanonicalName(String name)
    • acquireEntry

      protected abstract RegistryEntry acquireEntry(String name)
      Returns the internal representation of a leaf.

      Note that this method must handle an invalid name

      参数:
      name - The name of the leaf to look up
      返回:
      The RegistryEntry
    • acquireEntryValue

      public Object acquireEntryValue(String name)
    • inferTyping

      @NotVirtual public Optional<Collection<Class<? extends RegistryEntry>>> inferTyping()
      从接口复制的说明: ITypeInferencing
      The class may or may not return a valid type inferencing due to internal reasons, so an Optional is returned.
      指定者:
      inferTyping 在接口中 ITypeInferencing<Collection<Class<? extends RegistryEntry>>>
      返回:
      The typing inferred from the internal representation of the class
    • forEach

      protected abstract void forEach(Consumer<Object> e)
      An internal iterable instance (should not be exposed by reflection)
      参数:
      e - Consumer