类 EphemeralRegistry

java.lang.Object
pkg.exoad.poprock.core.registry.BaseRegistry
pkg.exoad.poprock.core.registry.EphemeralRegistry
所有已实现的接口:
Serializable, DebuggableMixin, SelfReportingMixin, ITypeInferencing<Collection<Class<? extends RegistryEntry>>>, NamedObjMixin

public final class EphemeralRegistry extends BaseRegistry implements DebuggableMixin, NamedObjMixin, Serializable

Ephemeral Registry

An EphemeralRegistry is the most basic registry type. By basic meaning that any functionality that depends on this registry must perform manual lookup within this registry. This means when a property is changed, no MVC pattern is implemented by the registry.

However, you can get around this by using a registry entry's internal checker function as a listener. However, sometimes this is not guranteed to be called.

Leaf Validation

Leaf validation defines how properties flow within the registry. This just means what happens when the program wants to set an entry's value to something else. For the most part, this is quite trivial, we call the entry's checker function and see what it shows and do the appropriate operation based on the result. However, Ephemeral Registry also performs a few optimizations on behalf of the entries themselves. One of the biggest is basic object equality. If the current entry's value is already equal to

另请参阅:
  • 字段详细资料

    • NOT_ALLOWED_SEQUENCES

      private static final CharSequence[] NOT_ALLOWED_SEQUENCES
      Internal conventions that are preserved
    • leaves

      private final HashMap<String,RegistryEntry> leaves
      The internal representation of all of the properties
  • 构造器详细资料

    • EphemeralRegistry

      private EphemeralRegistry(String rootName)
      Initiates a new Ephemeral Registry by using just the rootName
      参数:
      rootName - The name to use for this registry (this is descriptive)
    • EphemeralRegistry

      @VolatileImpl(reason="load factor less than 0") EphemeralRegistry(String rootName, float loadFactor, Pair<String,RegistryEntry>[] entries)
      Initiates a new Ephemeral Reigstry with some more parameters.
      参数:
      rootName - The name to use for this registry (this is descriptive)
      loadFactor - The load factor to use for the internal backing hash table
      entries - Any default entries that can be emplaced into the hashtable
  • 方法详细资料