Package org.gittorr.ccerial.utils
Interface ClassIdentifierGenerator
- All Known Implementing Classes:
ClassIdentifierGenerator.FNV1aClassIdentifierGenerator
public interface ClassIdentifierGenerator
The
ClassIdentifierGenerator interface defines a contract for generating unique
integer identifiers for class names. This is typically used in the Ccerial framework
to associate classes with their respective binary serialization identifiers.
It includes a default implementation, ClassIdentifierGenerator.FNV1aClassIdentifierGenerator, which uses
the FNV-1a hash algorithm to generate compact and consistent identifiers.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintgenerateIdentifier(String className) Generates an integer identifier for the given class name.
-
Field Details
-
INSTANCE
-
-
Method Details
-
generateIdentifier
Generates an integer identifier for the given class name.- Parameters:
className- the fully qualified name of the class- Returns:
- a unique integer identifier for the class name
-