Package com.fauna.codec
Class CodecRegistryKey
- java.lang.Object
-
- com.fauna.codec.CodecRegistryKey
-
public class CodecRegistryKey extends java.lang.ObjectRepresents 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 newCodecRegistryKeyfor the specified class and type arguments.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)Compares this key with another object for equality based on the base class and type arguments.static <T> CodecRegistryKeyfrom(java.lang.Class<T> clazz)Creates aCodecRegistryKeyfor the specified class without any type arguments.static <T> CodecRegistryKeyfrom(java.lang.Class<T> clazz, java.lang.reflect.Type[] typeArgs)Creates aCodecRegistryKeyfor the specified class and type arguments.inthashCode()Returns a hash code for this key, based on the base class and type arguments.
-
-
-
Constructor Detail
-
CodecRegistryKey
public CodecRegistryKey(java.lang.Class<T> clazz, java.lang.reflect.Type[] typeArgs)Constructs a newCodecRegistryKeyfor 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 aCodecRegistryKeyfor 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
CodecRegistryKeyinstance.
-
from
public static <T> CodecRegistryKey from(java.lang.Class<T> clazz, java.lang.reflect.Type[] typeArgs)
Creates aCodecRegistryKeyfor 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
CodecRegistryKeyinstance.
-
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:
equalsin classjava.lang.Object- Parameters:
other- The object to compare with this key.- Returns:
trueif the other object is aCodecRegistryKeywith the same base class and type arguments;falseotherwise.
-
hashCode
public final int hashCode()
Returns a hash code for this key, based on the base class and type arguments.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code for this
CodecRegistryKey.
-
-