Class ExpressionWriter

  • class ExpressionWriter
    extends java.lang.Object
    Converts an expression to Java code.
    • Field Detail

      • buf

        private final java.lang.StringBuilder buf
      • level

        private int level
      • indent

        private java.lang.String indent
      • indentPending

        private boolean indentPending
      • generics

        private final boolean generics
    • Constructor Detail

      • ExpressionWriter

      • ExpressionWriter

        ExpressionWriter​(boolean generics)
    • Method Detail

      • write

        public void write​(Node expression)
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • requireParentheses

        public boolean requireParentheses​(Expression expression,
                                          int lprec,
                                          int rprec)
        If parentheses are required, writes this expression out with parentheses and returns true. If they are not required, does nothing and returns false.
      • begin

        public void begin()
        Increases the indentation level.
      • end

        public void end()
        Decreases the indentation level.
      • checkIndent

        private void checkIndent()
      • getBuf

        public java.lang.StringBuilder getBuf()
      • list

        public ExpressionWriter list​(java.lang.String begin,
                                     java.lang.String sep,
                                     java.lang.String end,
                                     java.lang.Iterable<?> list)
      • backUp

        public void backUp()