Package com.io7m.waxmill.parser.api
Interface WXMParserProviderType<T>
- Type Parameters:
T- The type of input values
- All Known Subinterfaces:
WXMBootConfigurationParserProviderType,WXMClientConfigurationParserProviderType,WXMVirtualMachineParserProviderType
- All Known Implementing Classes:
WXMBootConfigurationParsers,WXMClientConfigurationParsers,WXMVirtualMachineParsers
public interface WXMParserProviderType<T>
The type of parser providers.
-
Method Summary
Modifier and Type Method Description WXMParserType<T>create(java.nio.file.FileSystem fileSystem, java.net.URI uri, java.io.InputStream stream, java.util.function.Consumer<WXMParseError> errors)Create a new parser.default Tparse(java.nio.file.Path path)Convenience function to parse a file directly.
-
Method Details
-
create
WXMParserType<T> create(java.nio.file.FileSystem fileSystem, java.net.URI uri, java.io.InputStream stream, java.util.function.Consumer<WXMParseError> errors) throws java.io.IOExceptionCreate a new parser.- Parameters:
fileSystem- The filesystem used to create new paths, if necessaryuri- The source URIstream- The source streamerrors- A receiver of parse errors- Returns:
- A new parser
- Throws:
java.io.IOException- On I/O errors
-
parse
Convenience function to parse a file directly. Throws an exception if there are any errors logged.- Parameters:
path- The file- Returns:
- A parsed value
- Throws:
WXMException- On errors
-