Class DefaultNodeFactory
- java.lang.Object
-
- software.amazon.smithy.model.node.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.
-
-
Constructor Summary
Constructors Constructor Description DefaultNodeFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
createNode(java.lang.String filename, java.lang.String text)
Creates aNode
from a documentString
.
-
-
-
Method Detail
-
createNode
public Node createNode(java.lang.String filename, java.lang.String text)
Description copied from interface:NodeFactory
Creates aNode
from a documentString
.The filename is used in error messages and for populating source locations for the built node objects.
- Specified by:
createNode
in interfaceNodeFactory
- 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.
-
-