Skip to content

Commit fc65475

Browse files
committed
chore: fix javadocs issues
1 parent 6be14f1 commit fc65475

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

src/main/java/io/flamingock/template/sql/util/SqlSplitterFactory.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public class SqlSplitterFactory {
6666
/**
6767
* Registers a custom splitter for a given dialect, overriding the built-in one.
6868
* Useful for extending support to new dialects without modifying this factory.
69+
*
70+
* @param dialect the SQL dialect to register
71+
* @param supplier the supplier that creates the splitter instance
6972
*/
7073
public static void registerSplitter(SqlDialect dialect, Supplier<SqlSplitter> supplier) {
7174
customSplitters.put(dialect, supplier);
@@ -74,6 +77,8 @@ public static void registerSplitter(SqlDialect dialect, Supplier<SqlSplitter> su
7477
/**
7578
* Removes a previously registered custom splitter for the given dialect,
7679
* restoring the built-in behaviour. Intended for use in tests.
80+
*
81+
* @param dialect the SQL dialect to deregister
7782
*/
7883
public static void deregisterSplitter(SqlDialect dialect) {
7984
customSplitters.remove(dialect);

src/main/java/io/flamingock/template/sql/util/SqlStatement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public SqlStatement(String sql) {
5151
* Creates a SQL statement with specified repeat count.
5252
*
5353
* @param sql the SQL statement text
54-
* @param repeatCount number of times to execute (must be >= 1)
54+
* @param repeatCount number of times to execute (must be &gt;= 1)
5555
* @throws IllegalArgumentException if repeatCount is less than 1
5656
*/
5757
public SqlStatement(String sql, int repeatCount) {
@@ -75,7 +75,7 @@ public String getSql() {
7575
* Returns the number of times this statement should be executed.
7676
* Default is 1 for normal statements.
7777
*
78-
* @return the repeat count (>= 1)
78+
* @return the repeat count (&gt;= 1)
7979
*/
8080
public int getRepeatCount() {
8181
return repeatCount;

src/main/java/io/flamingock/template/sql/util/splitter/AbstractSqlSplitter.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected boolean supportsEStrings() {
109109
/**
110110
* Override to enable hash (#) line comments (MySQL/MariaDB-style).
111111
* When false (default), '#' is treated as a regular character.
112-
* When true, '#' (not followed by '>') starts a line comment.
112+
* When true, '#' (not followed by '&gt;') starts a line comment.
113113
* @return true if hash should be treated as a line comment starter
114114
*/
115115
protected boolean supportsHashComments() {
@@ -169,6 +169,8 @@ protected String checkAdditionalDelimiter(String remaining, ParserState state) {
169169
* implicit reference to the enclosing {@code AbstractSqlSplitter} instance to invoke
170170
* those methods. Handlers with no such dependency are declared {@code static} to avoid
171171
* the unnecessary enclosing reference. This is an intentional design choice.
172+
*
173+
* @return ordered list of character handlers
172174
*/
173175
protected List<CharacterHandler> buildHandlers() {
174176
List<CharacterHandler> handlers = new ArrayList<>();
@@ -323,6 +325,12 @@ protected KeywordHandlingResult handleDialectKeywords(String sql, int index, Par
323325
/**
324326
* Generic keyword handling for BEGIN, CASE, END.
325327
* Subclasses should call this for standard keyword processing.
328+
*
329+
* @param sql the full SQL string being parsed
330+
* @param index the current position in the SQL string
331+
* @param state the current parser state
332+
* @param output the output buffer for the current statement
333+
* @return the updated index after processing
326334
*/
327335
protected int handleGenericKeywords(String sql, int index, ParserState state, StringBuilder output) {
328336
String remaining = sql.substring(index).toUpperCase();
@@ -557,7 +565,7 @@ public int handle(String sql, int index, ParserState state, StringBuilder output
557565

558566
/**
559567
* Handles line comments: -- and #
560-
* Respects JSON operators like #>, #>>, ->, and ->> (not treated as comments).
568+
* Respects JSON operators like {@code #>}, {@code #>>}, {@code ->}, and {@code ->>} (not treated as comments).
561569
*/
562570
protected class LineCommentHandler implements CharacterHandler {
563571
@Override

0 commit comments

Comments
 (0)