Class TypeEncoderRegistry<E extends Encoder<?,?>>

java.lang.Object
de.craftsblock.craftsnet.api.codec.registry.TypeCodecRegistry<E,EncoderPair<?>>
de.craftsblock.craftsnet.api.codec.registry.TypeEncoderRegistry<E>
Type Parameters:
E - the type of encoder being managed

public final class TypeEncoderRegistry<E extends Encoder<?,?>> extends TypeCodecRegistry<E,EncoderPair<?>>
A specialized implementation of TypeCodecRegistry for managing Encoder instances.

This registry maps encoders to the Java types they support, allowing for efficient lookup, registration, and removal of type-bound EncoderPairs.

It uses generic type reflection to associate each Encoder with its target class, enabling dynamic codec resolution based on type hierarchies.

Since:
3.5.0
See Also:
  • Constructor Details

    • TypeEncoderRegistry

      public TypeEncoderRegistry()
      Constructs a new TypeEncoderRegistry instance.

      The constructor uses type reflection to resolve the generic encoder pair type associated with this registry.