Interface ResourceLoader

All Known Implementing Classes:
YamlConfigReader

public interface ResourceLoader
Constructs a new object based on the contents read from some URL.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    load(InputStream inputStream, Class<T> clazz)
    Creates a new instance of T based on the contents read from the specified InputStream.
    <T> T
    load(URL url, Class<T> clazz)
    Creates a new instance of T based on the contents retrieved from the specified URL.
  • Method Details

    • load

      <T> T load(URL url, Class<T> clazz)
      Creates a new instance of T based on the contents retrieved from the specified URL.
      Parameters:
      url - URL defining the returned object
      clazz - generic class to defined by the supplied configuration
      Returns:
      a new instance of T
    • load

      <T> T load(InputStream inputStream, Class<T> clazz)
      Creates a new instance of T based on the contents read from the specified InputStream.
      Parameters:
      inputStream - InputStream
      clazz - generic class to defined by the supplied configuration
      Returns:
      a new Instance of T