Improve generated code for Java: is instead of get for booleans, utility methods in ASTNode class