Class DefaultNodeFactory

  • All Implemented Interfaces:
    NodeFactory

    public final class DefaultNodeFactory
    extends java.lang.Object
    implements NodeFactory
    Default Node factory implementation.

    Uses Jackson internally, but that is free to change in the future if needed.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Node createNode​(java.lang.String filename, java.lang.String text)
      Creates a Node from a document String.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultNodeFactory

        public DefaultNodeFactory()
    • Method Detail

      • createNode

        public Node createNode​(java.lang.String filename,
                               java.lang.String text)
        Description copied from interface: NodeFactory
        Creates a Node from a document String.

        The filename is used in error messages and for populating source locations for the built node objects.

        Specified by:
        createNode in interface NodeFactory
        Parameters:
        filename - The name of the document that is being parsed to create nodes.
        text - The document to parse into nodes.
        Returns:
        Returns a Node representing the document.