Skip to content

Commit ccd5c5a

Browse files
committed
Fixup javadoc issues
1 parent 78098db commit ccd5c5a

18 files changed

+69
-95
lines changed

src/main/java/org/apache/ibatis/annotations/CacheNamespace.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,16 @@
2828
/**
2929
* The annotation that specify to use cache on namespace(e.g. mapper interface).
3030
* <p>
31-
* <b>How to use:</b> <code>
32-
* <pre>
33-
* &#064;CacheNamespace(implementation = CustomCache.class, properties = {
34-
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
35-
* &#064;Property(name = "port", value = "${mybatis.cache.port}"),
36-
* &#064;Property(name = "name", value = "usersCache")
37-
* })
31+
* <b>How to use:</b>
32+
*
33+
* <pre>{@code
34+
* @CacheNamespace(implementation = CustomCache.class, properties = {
35+
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
36+
* &#064;Property(name = "port", value = "${mybatis.cache.port}"), &#064;Property(name = "name", value = "usersCache") })
3837
* public interface UserMapper {
3938
* // ...
4039
* }
41-
* </pre>
42-
* </code>
40+
* }</pre>
4341
*
4442
* @author Clinton Begin
4543
* @author Kazuki Shimizu

src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,17 @@
2424
/**
2525
* The annotation that be grouping mapping definitions for constructor.
2626
* <p>
27-
* <b>How to use:</b> <code>
28-
* <pre>
27+
* <b>How to use:</b>
28+
*
29+
* <pre>{@code
2930
* public interface UserMapper {
30-
* &#064;ConstructorArgs({
31-
* &#064;Arg(column = "id", javaType = int.class, id = true),
32-
* &#064;Arg(column = "name", javaType = String.class),
33-
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id")
34-
* })
31+
* @ConstructorArgs({ &#064;Arg(column = "id", javaType = int.class, id = true),
32+
* &#064;Arg(column = "name", javaType = String.class),
33+
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
3534
* &#064;Select("SELECT id, name FROM users WHERE id = #{id}")
3635
* User selectById(int id);
3736
* }
38-
* </pre>
39-
* </code>
37+
* }</pre>
4038
*
4139
* @author Clinton Begin
4240
*/

src/main/java/org/apache/ibatis/annotations/DeleteProvider.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for deleting record(s).
2727
* <p>
28-
* <b>How to use:</b> <code>
29-
* <pre>
28+
* <b>How to use:</b>
29+
*
30+
* <pre>{@code
3031
* public interface UserMapper {
3132
*
32-
* &#064;DeleteProvider(type = SqlProvider.class, method = "deleteById")
33+
* @DeleteProvider(type = SqlProvider.class, method = "deleteById")
3334
* boolean deleteById(int id);
3435
*
3536
* public static class SqlProvider {
@@ -39,8 +40,7 @@
3940
* }
4041
*
4142
* }
42-
* </pre>
43-
* </code>
43+
* }</pre>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -77,7 +77,9 @@
7777
* <p>
7878
* Since 3.5.1, this attribute can omit.
7979
* <p>
80-
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
80+
* If this attribute omit, the MyBatis will call a method that decide by following rules.
81+
*
82+
* <pre>
8183
* <ul>
8284
* <li>
8385
* If class that specified the {@link #type()} attribute implements the
@@ -86,11 +88,11 @@
8688
* </li>
8789
* <li>
8890
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
89-
* (= not implement it or it was returned {@code null}), the MyBatis will search
90-
* and use a fallback method that named {@code provideSql} from specified type
91+
* (= not implement it or it was returned <code>null</code>), the MyBatis will search
92+
* and use a fallback method that named <code>provideSql</code> from specified type
9193
* </li>
9294
* </ul>
93-
* </code>
95+
* </pre>
9496
*
9597
* @return a method name of method for providing an SQL
9698
*/

src/main/java/org/apache/ibatis/annotations/InsertProvider.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for inserting record(s).
2727
* <p>
28-
* <b>How to use:</b> <code>
29-
* <pre>
28+
* <b>How to use:</b>
29+
*
30+
* <pre>{@code
3031
* public interface UserMapper {
3132
*
32-
* &#064;InsertProvider(type = SqlProvider.class, method = "insert")
33+
* @InsertProvider(type = SqlProvider.class, method = "insert")
3334
* void insert(User user);
3435
*
3536
* public static class SqlProvider {
@@ -39,8 +40,7 @@
3940
* }
4041
*
4142
* }
42-
* </pre>
43-
* </code>
43+
* }</pre>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -77,7 +77,9 @@
7777
* <p>
7878
* Since 3.5.1, this attribute can omit.
7979
* <p>
80-
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
80+
* If this attribute omit, the MyBatis will call a method that decide by following rules.
81+
*
82+
* <pre>
8183
* <ul>
8284
* <li>
8385
* If class that specified the {@link #type()} attribute implements the
@@ -86,11 +88,11 @@
8688
* </li>
8789
* <li>
8890
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
89-
* (= not implement it or it was returned {@code null}), the MyBatis will search
90-
* and use a fallback method that named {@code provideSql} from specified type
91+
* (= not implement it or it was returned <code>null</code>), the MyBatis will search
92+
* and use a fallback method that named <code>provideSql</code> from specified type
9193
* </li>
9294
* </ul>
93-
* </code>
95+
* </pre>
9496
*
9597
* @return a method name of method for providing an SQL
9698
*/

src/main/java/org/apache/ibatis/annotations/Options.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ enum FlushCachePolicy {
110110
* Returns property names that holds a key value.
111111
* <p>
112112
* If you specify multiple property, please separate using comma(',').
113-
* </p>
114113
*
115114
* @return property names that separate with comma(',')
116115
*/
@@ -120,7 +119,6 @@ enum FlushCachePolicy {
120119
* Returns column names that retrieves a key value.
121120
* <p>
122121
* If you specify multiple column, please separate using comma(',').
123-
* </p>
124122
*
125123
* @return column names that separate with comma(',')
126124
*/
@@ -130,7 +128,6 @@ enum FlushCachePolicy {
130128
* Returns result set names.
131129
* <p>
132130
* If you specify multiple result set, please separate using comma(',').
133-
* </p>
134131
*
135132
* @return result set names that separate with comma(',')
136133
*/

src/main/java/org/apache/ibatis/annotations/Select.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
* The annotation that specify an SQL for retrieving record(s).
2727
* <p>
2828
* <b>How to use:</b>
29-
* <p>
3029
* <ul>
3130
* <li>Simple:
3231
*

src/main/java/org/apache/ibatis/annotations/SelectKey.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
* Returns property names that holds a key value.
5656
* <p>
5757
* If you specify multiple property, please separate using comma(',').
58-
* </p>
5958
*
6059
* @return property names that separate with comma(',')
6160
*/
@@ -65,7 +64,6 @@
6564
* Returns column names that retrieves a key value.
6665
* <p>
6766
* If you specify multiple column, please separate using comma(',').
68-
* </p>
6967
*
7068
* @return column names that separate with comma(',')
7169
*/

src/main/java/org/apache/ibatis/annotations/SelectProvider.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for retrieving record(s).
2727
* <p>
28-
* <b>How to use:</b> <code>
29-
* <pre>
28+
* <b>How to use:</b>
29+
*
30+
* <pre>{@code
3031
* public interface UserMapper {
3132
*
32-
* &#064;SelectProvider(type = SqlProvider.class, method = "selectById")
33+
* @SelectProvider(type = SqlProvider.class, method = "selectById")
3334
* User selectById(int id);
3435
*
3536
* public static class SqlProvider {
@@ -39,8 +40,7 @@
3940
* }
4041
*
4142
* }
42-
* </pre>
43-
* </code>
43+
* }</pre>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -77,7 +77,9 @@
7777
* <p>
7878
* Since 3.5.1, this attribute can omit.
7979
* <p>
80-
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
80+
* If this attribute omit, the MyBatis will call a method that decide by following rules.
81+
*
82+
* <pre>
8183
* <ul>
8284
* <li>
8385
* If class that specified the {@link #type()} attribute implements the
@@ -86,11 +88,11 @@
8688
* </li>
8789
* <li>
8890
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
89-
* (= not implement it or it was returned {@code null}), the MyBatis will search
90-
* and use a fallback method that named {@code provideSql} from specified type.
91+
* (= not implement it or it was returned <code>null</code>), the MyBatis will search
92+
* and use a fallback method that named <code>provideSql</code> from specified type.
9193
* </li>
9294
* </ul>
93-
* </code>
95+
* </pre>
9496
*
9597
* @return a method name of method for providing an SQL
9698
*/

src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,17 @@
2828
/**
2929
* The annotation that be grouping conditional mapping definitions.
3030
* <p>
31-
* <b>How to use:</b> <code>
32-
* <pre>
31+
* <b>How to use:</b>
32+
*
33+
* <pre>{@code
3334
* public interface UserMapper {
3435
* &#064;Select("SELECT id, name, type FROM users ORDER BY id")
35-
* &#064;TypeDiscriminator(
36-
* column = "type",
37-
* javaType = String.class,
38-
* cases = {
39-
* &#064;Case(value = "1", type = PremiumUser.class),
40-
* &#064;Case(value = "2", type = GeneralUser.class),
41-
* &#064;Case(value = "3", type = TemporaryUser.class)
42-
* }
43-
* )
36+
* &#064;TypeDiscriminator(column = "type", javaType = String.class, cases = {
37+
* &#064;Case(value = "1", type = PremiumUser.class), &#064;Case(value = "2", type = GeneralUser.class),
38+
* &#064;Case(value = "3", type = TemporaryUser.class) })
4439
* List&lt;User&gt; selectAll();
4540
* }
46-
* </pre>
47-
* </code>
41+
* }</pre>
4842
*
4943
* @author Clinton Begin
5044
*/

src/main/java/org/apache/ibatis/annotations/UpdateProvider.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for updating record(s).
2727
* <p>
28-
* <b>How to use:</b> <code>
28+
* <b>How to use:</b>
2929
*
30-
* <pre>
30+
* <pre>{@code
3131
* public interface UserMapper {
3232
*
33-
* &#064;UpdateProvider(type = SqlProvider.class, method = "update")
33+
* @UpdateProvider(type = SqlProvider.class, method = "update")
3434
* boolean update(User user);
3535
*
3636
* public static class SqlProvider {
@@ -40,9 +40,7 @@
4040
* }
4141
*
4242
* }
43-
* </pre>
44-
*
45-
* <code>
43+
* }</pre>
4644
*
4745
* @author Clinton Begin
4846
*/
@@ -78,7 +76,9 @@
7876
* Specify a method for providing an SQL.
7977
* <p>
8078
* Since 3.5.1, this attribute can omit. If this attribute omit, the MyBatis will call a method that decide by
81-
* following rules. <code>
79+
* following rules.
80+
*
81+
* <pre>
8282
* <ul>
8383
* <li>
8484
* If class that specified the {@link #type()} attribute implements the
@@ -87,10 +87,10 @@
8787
* </li>
8888
* <li>
8989
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
90-
* (= not implement it or it was returned {@code null}), the MyBatis will search and use a fallback method
91-
* that named {@code provideSql} from specified type</li>
90+
* (= not implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method
91+
* that named <code>provideSql</code> from specified type</li>
9292
* </ul>
93-
* </code>
93+
* </pre>
9494
*
9595
* @return a method name of method for providing an SQL
9696
*/

src/main/java/org/apache/ibatis/builder/InitializingObject.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public interface InitializingObject {
2828
* Initialize an instance.
2929
* <p>
3030
* This method will be invoked after it has set all properties.
31-
* </p>
3231
*
3332
* @throws Exception
3433
* in the event of misconfiguration (such as failure to set an essential property) or if initialization

src/main/java/org/apache/ibatis/executor/statement/StatementUtil.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ private StatementUtil() {
3535
* Apply a transaction timeout.
3636
* <p>
3737
* Update a query timeout to apply a transaction timeout.
38-
* </p>
3938
*
4039
* @param statement
4140
* a target statement

src/main/java/org/apache/ibatis/lang/UsesJava7.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
import java.lang.annotation.Target;
2323

2424
/**
25-
* <p>
2625
* Indicates that the element uses Java 7 API.
27-
* </p>
2826
*/
2927
@Documented
3028
@Retention(RetentionPolicy.RUNTIME)

src/main/java/org/apache/ibatis/lang/UsesJava8.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
import java.lang.annotation.Target;
2323

2424
/**
25-
* <p>
2625
* Indicates that the element uses Java 8 API.
27-
* </p>
2826
*/
2927
@Documented
3028
@Retention(RetentionPolicy.RUNTIME)

src/main/java/org/apache/ibatis/parsing/PropertyParser.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public class PropertyParser {
2929
* <p>
3030
* The default value is {@code false} (indicate disable a default value on placeholder) If you specify the
3131
* {@code true}, you can specify key and default value on placeholder (e.g. {@code ${db.username:postgres}}).
32-
* </p>
3332
*
3433
* @since 3.4.2
3534
*/
@@ -39,7 +38,6 @@ public class PropertyParser {
3938
* The special property key that specify a separator for key and default value on placeholder.
4039
* <p>
4140
* The default separator is {@code ":"}.
42-
* </p>
4341
*
4442
* @since 3.4.2
4543
*/

0 commit comments

Comments
 (0)