Class CodecRegistryKey


  • public class CodecRegistryKey
    extends java.lang.Object
    Represents a unique key in the codec registry.
    • Constructor Summary

      Constructors 
      Constructor Description
      CodecRegistryKey​(java.lang.Class<T> clazz, java.lang.reflect.Type[] typeArgs)
      Constructs a new CodecRegistryKey for the specified class and type arguments.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)
      Compares this key with another object for equality based on the base class and type arguments.
      static <T> CodecRegistryKey from​(java.lang.Class<T> clazz)
      Creates a CodecRegistryKey for the specified class without any type arguments.
      static <T> CodecRegistryKey from​(java.lang.Class<T> clazz, java.lang.reflect.Type[] typeArgs)
      Creates a CodecRegistryKey for the specified class and type arguments.
      int hashCode()
      Returns a hash code for this key, based on the base class and type arguments.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CodecRegistryKey

        public CodecRegistryKey​(java.lang.Class<T> clazz,
                                java.lang.reflect.Type[] typeArgs)
        Constructs a new CodecRegistryKey for the specified class and type arguments.
        Type Parameters:
        T - The type of the base class.
        Parameters:
        clazz - The base class of the codec.
        typeArgs - The type arguments for generic types, if applicable.
    • Method Detail

      • from

        public static <T> CodecRegistryKey from​(java.lang.Class<T> clazz)
        Creates a CodecRegistryKey for the specified class without any type arguments.
        Type Parameters:
        T - The type of the base class.
        Parameters:
        clazz - The base class of the codec.
        Returns:
        A new CodecRegistryKey instance.
      • from

        public static <T> CodecRegistryKey from​(java.lang.Class<T> clazz,
                                                java.lang.reflect.Type[] typeArgs)
        Creates a CodecRegistryKey for the specified class and type arguments.
        Type Parameters:
        T - The type of the base class.
        Parameters:
        clazz - The base class of the codec.
        typeArgs - The type arguments for generic types.
        Returns:
        A new CodecRegistryKey instance.
      • equals

        public boolean equals​(java.lang.Object other)
        Compares this key with another object for equality based on the base class and type arguments.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        other - The object to compare with this key.
        Returns:
        true if the other object is a CodecRegistryKey with the same base class and type arguments; false otherwise.
      • hashCode

        public final int hashCode()
        Returns a hash code for this key, based on the base class and type arguments.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code for this CodecRegistryKey.