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 T parse​(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.IOException
      Create a new parser.
      Parameters:
      fileSystem - The filesystem used to create new paths, if necessary
      uri - The source URI
      stream - The source stream
      errors - A receiver of parse errors
      Returns:
      A new parser
      Throws:
      java.io.IOException - On I/O errors
    • parse

      default T parse​(java.nio.file.Path path) throws WXMException
      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