Package net.obvj.confectory.source
Class StringSource<T>
- java.lang.Object
-
- net.obvj.confectory.source.AbstractSource<T>
-
- net.obvj.confectory.source.StringSource<T>
-
- All Implemented Interfaces:
Source<T>
public class StringSource<T> extends AbstractSource<T> implements Source<T>
A specializedSourcethat loads the contents of aString.- Since:
- 0.1.0
- Author:
- oswaldo.bapvic.jr (Oswaldo Junior)
-
-
Constructor Summary
Constructors Constructor Description StringSource(String source)Builds a new configuration source from the specified string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tload(Mapper<T> mapper)Applies a specific configuration loading strategy and returns a mapped bean containing the retrieved data, throwing an exception if the operation fails.StringtoString()-
Methods inherited from class net.obvj.confectory.source.AbstractSource
equals, hashCode, load
-
-
-
-
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:SourceApplies a specific configuration loading strategy and returns a mapped bean containing the retrieved data, throwing an exception if the operation fails.
-
toString
public String toString()
- Overrides:
toStringin classAbstractSource<T>
-
-