public class WatchFileXmlImplStub extends Object
ConfigurationXmlImpl.| Modifier and Type | Field and Description |
|---|---|
protected EventBus |
eventBus |
protected File |
file |
protected String |
sourceId |
| Modifier and Type | Method and Description |
|---|---|
<T> ConfigurationXmlImpl<T> |
mappedTo(Class<T> clazz)
Instructs the configuration object to map the contents of the XML file to an object of the given type.
|
protected final String sourceId
protected final File file
protected final EventBus eventBus
public <T> ConfigurationXmlImpl<T> mappedTo(Class<T> clazz) throws IOException
ConfigurationXmlImpl<User> config = Watch.xml("/path/to/user.xml").mappedTo(User.class);
User user = config.getValue();
clazz - Non-null typeIOException - On I/O parsing the XML fileCopyright © 2016–2017. All rights reserved.