Class ConfigResourceLoader

java.lang.Object
io.github.qubitpi.athena.config.ConfigResourceLoader

public class ConfigResourceLoader extends Object
Utilities to help load resources for the SystemConfig.
  • Constructor Details

    • ConfigResourceLoader

      public ConfigResourceLoader()
  • Method Details

    • getInstance

      @NotNull public static @NotNull ConfigResourceLoader getInstance()
      Singleton factory method.
      Returns:
      a new instance
    • loadConfigurations

      @NotNull public @NotNull List<org.apache.commons.configuration2.Configuration> loadConfigurations(@NotNull @NotNull String name) throws IOException
      Load configurations matching a resource name from the class path and parse into Configuration objects.
      Parameters:
      name - The class path address of a resource ('/foo' means a resource named "foo" under resource/ directory)
      Returns:
      a list of configurations corresponding to the matching class path resource
      Throws:
      NullPointerException - if name is null
      IOException - if any resource cannot be read from the class path successfully