public class LexicalPreservingPrinter extends Object
Modifier and Type | Field and Description |
---|---|
static DataKey<com.github.javaparser.printer.lexicalpreservation.NodeText> |
NODE_TEXT_DATA
The nodetext for a node is stored in the node's data field.
|
Constructor and Description |
---|
LexicalPreservingPrinter(Node node)
Deprecated.
use setup(Node) to prepare a node for lexical preservation,
then use the static methods on this class to print it.
|
Modifier and Type | Method and Description |
---|---|
static String |
print(Node node)
Print a Node into a String, preserving the lexical information.
|
static void |
print(Node node,
Writer writer)
Print a Node into a Writer, preserving the lexical information.
|
static <N extends Node> |
setup(N node)
Prepares the node so it can be used in the print methods.
|
static <N extends Node> |
setup(ParseStart<N> parseStart,
Provider provider)
Deprecated.
use setup(Node) and the static methods on this class.
|
public static final DataKey<com.github.javaparser.printer.lexicalpreservation.NodeText> NODE_TEXT_DATA
@Deprecated public LexicalPreservingPrinter(Node node)
public static <N extends Node> Pair<ParseResult<N>,LexicalPreservingPrinter> setup(ParseStart<N> parseStart, Provider provider)
public static <N extends Node> N setup(N node)
public static String print(Node node)
public static void print(Node node, Writer writer) throws IOException
IOException
Copyright © 2007–2018. All rights reserved.