Package graphql.language
Class PrettyAstPrinter
- java.lang.Object
-
- graphql.language.AstPrinter
-
- graphql.language.PrettyAstPrinter
-
@ExperimentalApi public class PrettyAstPrinter extends AstPrinter
A printer that acts as a code formatter. This printer will preserve pretty much all elements from the source text, even those that are not part of the AST (and are thus discarded by theAstPrinter
), like comments.- See Also:
AstPrinter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PrettyAstPrinter.PrettyPrinterOptions
Contains options that modify how a document is printed.
-
Constructor Summary
Constructors Constructor Description PrettyAstPrinter(NodeToRuleCapturingParser.ParserContext parserContext)
PrettyAstPrinter(NodeToRuleCapturingParser.ParserContext parserContext, PrettyAstPrinter.PrettyPrinterOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
print(Node node)
static java.lang.String
print(java.lang.String schemaDefinition, PrettyAstPrinter.PrettyPrinterOptions options)
-
Methods inherited from class graphql.language.AstPrinter
printAst, printAst, printAstCompact
-
-
-
-
Constructor Detail
-
PrettyAstPrinter
public PrettyAstPrinter(NodeToRuleCapturingParser.ParserContext parserContext)
-
PrettyAstPrinter
public PrettyAstPrinter(NodeToRuleCapturingParser.ParserContext parserContext, PrettyAstPrinter.PrettyPrinterOptions options)
-
-
Method Detail
-
print
public java.lang.String print(Node node)
-
print
public static java.lang.String print(java.lang.String schemaDefinition, PrettyAstPrinter.PrettyPrinterOptions options)
-
-