Class StringSource<T>

  • All Implemented Interfaces:
    Source<T>

    public class StringSource<T>
    extends AbstractSource<T>
    implements Source<T>
    A specialized Source that loads the contents of a String.
    Since:
    0.1.0
    Author:
    oswaldo.bapvic.jr (Oswaldo Junior)
    • Constructor Detail

      • StringSource

        public StringSource​(String source)
        Builds a new configuration source from the specified string.
        Parameters:
        source - the string to be loaded.
    • Method Detail

      • load

        public T load​(Mapper<T> mapper)
        Description copied from interface: Source
        Applies a specific configuration loading strategy and returns a mapped bean containing the retrieved data, throwing an exception if the operation fails.
        Specified by:
        load in interface Source<T>
        Parameters:
        mapper - the Mapper to be applied on the source input stream
        Returns:
        the loaded configuration data