class ExpressionWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
private StringBuilder |
buf |
private boolean |
generics |
private static int |
INDENT
How many spaces to indent Java code.
|
private boolean |
indentPending |
private org.apache.calcite.avatica.util.Spacer |
spacer |
| Constructor and Description |
|---|
ExpressionWriter() |
ExpressionWriter(boolean generics) |
| Modifier and Type | Method and Description |
|---|---|
ExpressionWriter |
append(AbstractNode o) |
ExpressionWriter |
append(char c) |
ExpressionWriter |
append(Object o) |
ExpressionWriter |
append(String s) |
ExpressionWriter |
append(Type type) |
void |
backUp() |
void |
begin()
Increases the indentation level.
|
ExpressionWriter |
begin(String s) |
private void |
checkIndent() |
void |
end()
Decreases the indentation level.
|
ExpressionWriter |
end(String s) |
StringBuilder |
getBuf() |
ExpressionWriter |
indent() |
ExpressionWriter |
list(String begin,
String sep,
String end,
Iterable<?> list) |
ExpressionWriter |
newlineAndIndent() |
boolean |
requireParentheses(Expression expression,
int lprec,
int rprec)
If parentheses are required, writes this expression out with
parentheses and returns true.
|
String |
toString() |
void |
write(Node expression) |
private static final int INDENT
private final org.apache.calcite.avatica.util.Spacer spacer
private final StringBuilder buf
private boolean indentPending
private final boolean generics
ExpressionWriter()
ExpressionWriter(boolean generics)
public void write(Node expression)
public boolean requireParentheses(Expression expression, int lprec, int rprec)
public void begin()
public void end()
public ExpressionWriter newlineAndIndent()
public ExpressionWriter indent()
public ExpressionWriter begin(String s)
public ExpressionWriter end(String s)
public ExpressionWriter append(char c)
public ExpressionWriter append(Type type)
public ExpressionWriter append(AbstractNode o)
public ExpressionWriter append(Object o)
public ExpressionWriter append(String s)
private void checkIndent()
public StringBuilder getBuf()
public ExpressionWriter list(String begin, String sep, String end, Iterable<?> list)
public void backUp()
Copyright © 2012–2023 The Apache Software Foundation. All rights reserved.