Interface ConfigReaderProvider

All Known Implementing Classes:
YamlConfigReaderProvider

public interface ConfigReaderProvider
Provider of a single type of config readers. Set up with creating the file:

 META-INF/services/net.morimekta.config.readers.ConfigReaderProvider
 
And containing the class path of your provider, and to add the provider as provided in the module-info.java as such:

 provides net.morimekta.config.readers.ConfigReaderProvider
     with your.provider.ClassPath;
 
  • Method Summary

    Modifier and Type
    Method
    Description
    <ConfigType>
    Optional<ConfigReader<ConfigType>>
    getReaderFor(Class<ConfigType> type, Path file)
    Get a config reader for given type and file, if applicable.
  • Method Details

    • getReaderFor

      <ConfigType> Optional<ConfigReader<ConfigType>> getReaderFor(Class<ConfigType> type, Path file)
      Get a config reader for given type and file, if applicable.
      Type Parameters:
      ConfigType - The config type.
      Parameters:
      type - The config type to get reader for.
      file - The file to get reader for.
      Returns:
      The provided reader, or empty optional if not applicable.