Interface ClassResolver

All Known Implementing Classes:
ConfigurationSerializer, EnumSerializer, JRESerializer, Serializer, SimpleClassResolver, YggdrasilSerializer, YggdrasilSerializer

public interface ClassResolver
  • Method Summary

    Modifier and Type
    @Nullable Class<?>
    Resolves a class by its ID.
    @Nullable String
    getID(Class<?> c)
    Gets an ID for a Class.
  • Method Details

    • getClass

      @Nullable Class<?> getClass(String id)
      Resolves a class by its ID.
      id - The ID used when storing objects
      The Class object that represents data with the given ID, or null if the ID does not belong to the implementor
    • getID

      @Nullable String getID(Class<?> c)
      Gets an ID for a Class. The ID is used to identify the type of a saved object.

      // TODO make sure that it's unique

      c - The class to get the ID of
      The ID of the given class, or null if this is not a class of the implementor