Interface IdentifiableFactoryFinder<E extends Identifiable>

    • Method Detail

      • create

        E create​(int id,
                 InputStream is)
        If there is a registered factory for id, use it to read an Identifiable from is. Otherwise create an appropriate generic container, or throw an error. The type of generic container, or error behavior is a property of the implementation.
        Parameters:
        id - id of registered factory
        is - stream to read from
        Returns:
        Identifiable found
      • registerFactory

        void registerFactory​(IdentifiableFactory<E> factory)
        Register a factory for the given id.
        Parameters:
        factory - factory to register