Interface ClassResolver

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

public interface ClassResolver
  • Method Summary

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

    • getClass

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

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

      Parameters:
      clazz - The class to get the ID of
      Returns:
      The ID of the given class, or null if this is not a class of the implementor