diff --git a/jOOQ/src/main/java/org/jooq/impl/Tools.java b/jOOQ/src/main/java/org/jooq/impl/Tools.java
index 950c687b70..198f24d917 100644
--- a/jOOQ/src/main/java/org/jooq/impl/Tools.java
+++ b/jOOQ/src/main/java/org/jooq/impl/Tools.java
@@ -53,7 +53,10 @@ import static java.util.stream.Collectors.joining;
import static org.jooq.SQLDialect.DERBY;
// ...
import static org.jooq.SQLDialect.FIREBIRD;
-import static org.jooq.SQLDialect.*;
+import static org.jooq.SQLDialect.H2;
+// ...
+import static org.jooq.SQLDialect.HSQLDB;
+// ...
// ...
// ...
import static org.jooq.SQLDialect.MARIADB;
@@ -183,6 +186,7 @@ import static org.jooq.impl.SQLDataType.XML;
import static org.jooq.impl.Tools.DataKey.DATA_BLOCK_NESTING;
import static org.jooq.tools.StringUtils.defaultIfNull;
+import java.lang.annotation.Annotation;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
@@ -238,10 +242,6 @@ import java.util.regex.Pattern;
import java.util.stream.IntStream;
import java.util.stream.Stream;
-import jakarta.persistence.Column;
-import jakarta.persistence.Entity;
-import jakarta.persistence.Id;
-
// ...
// ...
import org.jooq.Asterisk;
@@ -321,7 +321,6 @@ import org.jooq.exception.MappingException;
import org.jooq.exception.NoDataFoundException;
import org.jooq.exception.TemplatingException;
import org.jooq.exception.TooManyRowsException;
-import org.jooq.impl.QOM.GenerationOption;
import org.jooq.impl.ResultsImpl.ResultOrRowsImpl;
import org.jooq.tools.Ints;
import org.jooq.tools.JooqLogger;
@@ -338,6 +337,9 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import io.r2dbc.spi.R2dbcException;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
/**
* General internal jOOQ utilities
@@ -801,50 +803,50 @@ final class Tools {
* The default escape character for [a] LIKE [b] ESCAPE [...]
* clauses.
*/
- static final char ESCAPE = '!';
+ static final char ESCAPE = '!';
/**
* A lock for the initialisation of other static members
*/
- private static final Object initLock = new Object();
+ private static final Object initLock = new Object();
/**
* Indicating whether JPA (jakarta.persistence) is on the
* classpath.
*/
- private static volatile Boolean isJPAAvailable;
+ private static volatile JPANamespace jpaNamespace;
/**
* Indicating whether Kotlin (kotlin.*) is on the classpath.
*/
- private static volatile Boolean isKotlinAvailable;
- private static volatile Reflect ktJvmClassMapping;
- private static volatile Reflect ktKClasses;
- private static volatile Reflect ktKClass;
- private static volatile Reflect ktKTypeParameter;
+ private static volatile Boolean isKotlinAvailable;
+ private static volatile Reflect ktJvmClassMapping;
+ private static volatile Reflect ktKClasses;
+ private static volatile Reflect ktKClass;
+ private static volatile Reflect ktKTypeParameter;
/**
* [#3696] The maximum number of consumed exceptions in
* {@link #consumeExceptions(Configuration, PreparedStatement, SQLException)}
* helps prevent infinite loops and {@link OutOfMemoryError}.
*/
- static int maxConsumedExceptions = 256;
- static int maxConsumedResults = 65536;
+ static int maxConsumedExceptions = 256;
+ static int maxConsumedResults = 65536;
/**
* A pattern for the dash line syntax
*/
- private static final Pattern DASH_PATTERN = Pattern.compile("(-+)");
+ private static final Pattern DASH_PATTERN = Pattern.compile("(-+)");
/**
* A pattern for the pipe line syntax
*/
- private static final Pattern PIPE_PATTERN = Pattern.compile("(?<=\\|)([^|]+)(?=\\|)");
+ private static final Pattern PIPE_PATTERN = Pattern.compile("(?<=\\|)([^|]+)(?=\\|)");
/**
* A pattern for the dash line syntax
*/
- private static final Pattern PLUS_PATTERN = Pattern.compile("\\+(-+)(?=\\+)");
+ private static final Pattern PLUS_PATTERN = Pattern.compile("\\+(-+)(?=\\+)");
/**
* All characters that are matched by Java's interpretation of \s.
@@ -854,25 +856,25 @@ final class Tools {
* processing, it is probably safe to ignore most of those alternative
* Unicode whitespaces.
*/
- private static final char[] WHITESPACE_CHARACTERS = " \t\n\u000B\f\r".toCharArray();
+ private static final char[] WHITESPACE_CHARACTERS = " \t\n\u000B\f\r".toCharArray();
/**
* Acceptable prefixes for JDBC escape syntax.
*/
- private static final char[][] JDBC_ESCAPE_PREFIXES = {
+ private static final char[][] JDBC_ESCAPE_PREFIXES = {
"{fn ".toCharArray(),
"{d ".toCharArray(),
"{t ".toCharArray(),
"{ts ".toCharArray()
};
- private static final char[] TOKEN_SINGLE_LINE_COMMENT = { '-', '-' };
- private static final char[] TOKEN_SINGLE_LINE_COMMENT_C = { '/', '/' };
- private static final char[] TOKEN_HASH = { '#' };
- private static final char[] TOKEN_MULTI_LINE_COMMENT_OPEN = { '/', '*' };
- private static final char[] TOKEN_MULTI_LINE_COMMENT_CLOSE = { '*', '/' };
- private static final char[] TOKEN_APOS = { '\'' };
- private static final char[] TOKEN_ESCAPED_APOS = { '\'', '\'' };
+ private static final char[] TOKEN_SINGLE_LINE_COMMENT = { '-', '-' };
+ private static final char[] TOKEN_SINGLE_LINE_COMMENT_C = { '/', '/' };
+ private static final char[] TOKEN_HASH = { '#' };
+ private static final char[] TOKEN_MULTI_LINE_COMMENT_OPEN = { '/', '*' };
+ private static final char[] TOKEN_MULTI_LINE_COMMENT_CLOSE = { '*', '/' };
+ private static final char[] TOKEN_APOS = { '\'' };
+ private static final char[] TOKEN_ESCAPED_APOS = { '\'', '\'' };
/**
* "Suffixes" that are placed behind a "?" character to form an operator,
@@ -907,7 +909,7 @@ final class Tools {
*
"?<>", which is a non-equality operator, not
* an operator on its own.
*/
- private static final char[][] BIND_VARIABLE_SUFFIXES = {
+ private static final char[][] BIND_VARIABLE_SUFFIXES = {
{ '<', '>' }
};
@@ -934,17 +936,17 @@ final class Tools {
* All hexadecimal digits accessible through array index, e.g.
* HEX_DIGITS[15] == 'f'.
*/
- private static final char[] HEX_DIGITS = "0123456789abcdef".toCharArray();
+ private static final char[] HEX_DIGITS = "0123456789abcdef".toCharArray();
- static final Set