package org.jcodegen.java;

/**
 * ...
 */

public abstract class LogicBranchBlock<T extends LogicBranchBlock<T>> extends ConditionalBlock<T> {

    public LogicBranchBlock(final String keyword, final int indentationLevel, final Condition condition) {
        super(keyword, indentationLevel, condition);
    }

    protected boolean contentIsSuitableForOneLiner(final boolean moreElses) {
        if (!contentIsAOneLiner())
            return false;

        if (!moreElses)
            return true;

        return !contentContainsBlock("if");
    }

}

@@ -138,16 +138,60 @@
 k%3CT%3E %7B%0A%0A
+    private boolean forceBrackets = false;%0A%0A
     publ
@@ -210,22 +210,16 @@
 chBlock(
-final 
 String k
@@ -225,22 +225,16 @@
 keyword,
- final
  int ind
@@ -251,14 +251,8 @@
 vel,
- final
  Con
@@ -331,16 +331,190 @@
 %0A    %7D%0A%0A
+    public T forceBrackets(boolean forceBrackets) %7B%0A        this.forceBrackets = forceBrackets;%0A        return getThis();%0A    %7D%0A%0A    // TODO: re-analyse workings of function%0A
     prot
@@ -560,14 +560,8 @@
 ner(
-final 
 bool
@@ -573,24 +573,78 @@
 oreElses) %7B%0A
+        if (forceBrackets)%0A            return false;%0A%0A
         if (

Add option to force brackets on if body