Interface ITypeIdProvider

All Known Implementing Classes:
AbstractTypeIdProvider, NativeTypeIdProvider

public interface ITypeIdProvider
Definition of a type-id provider, mapping a type to a unique id, and vice-versa.
  • Method Details

    • getId

      int getId(Class<?> c)
      Get the ype-id of a given type.
      Parameters:
      c - the non-null type
      Returns:
      0 if the provider cannot find a corresponding type-id for the provided type
    • getType

      Class<?> getType(int id)
      Get a type by type-id.
      Parameters:
      id - the non-zero type-id
      Returns:
      the type, null if not found
    • getMap

      Map<Class<?>,Integer> getMap()
      Get the map of type to type-id.
      Returns:
      the type-id map
    • getReverseMap

      Map<Integer,Class<?>> getReverseMap()
      Get the reverse type-id map, mapping a type-id to a type.
      Returns:
      the reverse type-id map
    • addAll

      void addAll(ITypeIdProvider provider)
      Add of types from a provider to this provider.
      Parameters:
      provider - another provider