Text blocks
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
By default, jOOQ's code generator produces Java 15 text blocks for generated source code (e.g. views, check constraints, etc.) if your Java version is up to date. In some cases, it may be desirable to turn that off:
<configuration> <generator> <generate> <!-- Options include: - DETECT_FROM_JDK (default, generate text blocks if Java version supports them) - ON - OFF --> <textBlocks>OFF</textBlocks> </generate> </generator> </configuration>
See the configuration XSD, standalone code generation, and maven code generation for more details.
new org.jooq.meta.jaxb.Configuration() .withGenerator( new Generate() // Options include: // - DETECT_FROM_JDK (default, generate text blocks if Java version supports them) // - ON // - OFF .withTextBlocks(GeneratedTextBlocks.OFF) )
See the configuration XSD and programmatic code generation for more details.
// The jOOQ-codegen-gradle plugin has been introduced in version 3.19 only.
// The jOOQ-codegen-gradle plugin has been introduced in version 3.19 only.
generationTool { generator { generate { // Options include: // - DETECT_FROM_JDK (default, generate text blocks if Java version supports them) // - ON // - OFF textBlocks = "OFF" } } }
See the configuration XSD and gradle code generation for more details.
Feedback
Do you have any feedback about this page? We'd love to hear it!