Skip to content

Commit 260b30f

Browse files
authored
Merge pull request #3355 from hazendaz/pom-cleanup
Remove a few formatter off/on and correct related javadocs
2 parents 1feedf1 + 0fe675c commit 260b30f

File tree

9 files changed

+88
-105
lines changed

9 files changed

+88
-105
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,12 +25,10 @@
2525
import org.apache.ibatis.cache.decorators.LruCache;
2626
import org.apache.ibatis.cache.impl.PerpetualCache;
2727

28-
// @formatter:off
2928
/**
3029
* The annotation that specify to use cache on namespace(e.g. mapper interface).
3130
* <p>
32-
* <b>How to use:</b>
33-
*
31+
* <b>How to use:</b> <code>
3432
* <pre>
3533
* &#064;CacheNamespace(implementation = CustomCache.class, properties = {
3634
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
@@ -41,11 +39,11 @@
4139
* // ...
4240
* }
4341
* </pre>
42+
* </code>
4443
*
4544
* @author Clinton Begin
4645
* @author Kazuki Shimizu
4746
*/
48-
// @formatter:on
4947
@Documented
5048
@Retention(RetentionPolicy.RUNTIME)
5149
@Target(ElementType.TYPE)

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,12 +21,10 @@
2121
import java.lang.annotation.RetentionPolicy;
2222
import java.lang.annotation.Target;
2323

24-
// @formatter:off
2524
/**
2625
* The annotation that be grouping mapping definitions for constructor.
2726
* <p>
28-
* <b>How to use:</b>
29-
*
27+
* <b>How to use:</b> <code>
3028
* <pre>
3129
* public interface UserMapper {
3230
* &#064;ConstructorArgs({
@@ -38,10 +36,10 @@
3836
* User selectById(int id);
3937
* }
4038
* </pre>
39+
* </code>
4140
*
4241
* @author Clinton Begin
4342
*/
44-
// @formatter:on
4543
@Documented
4644
@Retention(RetentionPolicy.RUNTIME)
4745
@Target(ElementType.METHOD)

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

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,8 +25,7 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for deleting record(s).
2727
* <p>
28-
* <b>How to use:</b>
29-
*
28+
* <b>How to use:</b> <code>
3029
* <pre>
3130
* public interface UserMapper {
3231
*
@@ -41,6 +40,7 @@
4140
*
4241
* }
4342
* </pre>
43+
* </code>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -65,36 +65,37 @@
6565
* Specify a type that implements an SQL provider method.
6666
* <p>
6767
* This attribute is alias of {@link #value()}.
68-
* </p>
6968
*
7069
* @return a type that implements an SQL provider method
7170
*
7271
* @see #value()
7372
*/
7473
Class<?> type() default void.class;
7574

76-
// @formatter:off
7775
/**
7876
* Specify a method for providing an SQL.
7977
* <p>
8078
* Since 3.5.1, this attribute can omit.
8179
* <p>
82-
* If this attribute omit, the MyBatis will call a method that decide by following rules.
83-
* <ul>
84-
* <li>
85-
* If class that specified the {@link #type()} attribute implements the
86-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
87-
* the MyBatis use a method that returned by it
88-
* </li>
89-
* <li>
90-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}(= not implement it or it was returned {@code null}),
91-
* the MyBatis will search and use a fallback method that named {@code provideSql} from specified type
92-
* </li>
93-
* </ul>
80+
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
81+
* <pre>
82+
* <ul>
83+
* <li>
84+
* If class that specified the {@link #type()} attribute implements the
85+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
86+
* the MyBatis use a method that returned by it
87+
* </li>
88+
* <li>
89+
* 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
91+
* and use a fallback method that named {@code provideSql} from specified type
92+
* </li>
93+
* </ul>
94+
* </pre>
95+
* </code>
9496
*
9597
* @return a method name of method for providing an SQL
9698
*/
97-
// @formatter:on
9899
String method() default "";
99100

100101
/**

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

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,8 +25,7 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for inserting record(s).
2727
* <p>
28-
* <b>How to use:</b>
29-
*
28+
* <b>How to use:</b> <code>
3029
* <pre>
3130
* public interface UserMapper {
3231
*
@@ -41,6 +40,7 @@
4140
*
4241
* }
4342
* </pre>
43+
* </code>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -65,36 +65,37 @@
6565
* Specify a type that implements an SQL provider method.
6666
* <p>
6767
* This attribute is alias of {@link #value()}.
68-
* </p>
6968
*
7069
* @return a type that implements an SQL provider method
7170
*
7271
* @see #value()
7372
*/
7473
Class<?> type() default void.class;
7574

76-
// @formatter:off
7775
/**
7876
* Specify a method for providing an SQL.
7977
* <p>
8078
* Since 3.5.1, this attribute can omit.
8179
* <p>
82-
* If this attribute omit, the MyBatis will call a method that decide by following rules.
83-
* <ul>
84-
* <li>
85-
* If class that specified the {@link #type()} attribute implements the
86-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
87-
* the MyBatis use a method that returned by it
88-
* </li>
89-
* <li>
90-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}(= not implement it or it was returned {@code null}),
91-
* the MyBatis will search and use a fallback method that named {@code provideSql} from specified type
92-
* </li>
93-
* </ul>
80+
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
81+
* <pre>
82+
* <ul>
83+
* <li>
84+
* If class that specified the {@link #type()} attribute implements the
85+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
86+
* the MyBatis use a method that returned by it
87+
* </li>
88+
* <li>
89+
* 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
91+
* and use a fallback method that named {@code provideSql} from specified type
92+
* </li>
93+
* </ul>
94+
* </pre>
95+
* </code>
9496
*
9597
* @return a method name of method for providing an SQL
9698
*/
97-
// @formatter:on
9899
String method() default "";
99100

100101
/**

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

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,8 +25,7 @@
2525
/**
2626
* The annotation that specify a method that provide an SQL for retrieving record(s).
2727
* <p>
28-
* <b>How to use:</b>
29-
*
28+
* <b>How to use:</b> <code>
3029
* <pre>
3130
* public interface UserMapper {
3231
*
@@ -41,6 +40,7 @@
4140
*
4241
* }
4342
* </pre>
43+
* </code>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -72,31 +72,30 @@
7272
*/
7373
Class<?> type() default void.class;
7474

75-
// @formatter:off
7675
/**
7776
* Specify a method for providing an SQL.
7877
* <p>
7978
* Since 3.5.1, this attribute can omit.
8079
* <p>
81-
* If this attribute omit, the MyBatis will call a method that decide by following rules.
82-
*
83-
* <ul>
84-
* <li>
85-
* If class that specified the {@link #type()} attribute implements the
86-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
87-
* the MyBatis use a method that returned by it.
88-
* </li>
89-
* <li>
90-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
91-
* (= not implement it or it was returned <code>null</code>,
92-
* the MyBatis will search and use a fallback method that named <code>provideSql</code> from
93-
* specified type.
94-
* </li>
95-
* </ul>
80+
* If this attribute omit, the MyBatis will call a method that decide by following rules. <code>
81+
* <pre>
82+
* <ul>
83+
* <li>
84+
* If class that specified the {@link #type()} attribute implements the
85+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
86+
* the MyBatis use a method that returned by it.
87+
* </li>
88+
* <li>
89+
* 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
91+
* and use a fallback method that named {@code provideSql} from specified type.
92+
* </li>
93+
* </ul>
94+
* </pre>
95+
* </code>
9696
*
9797
* @return a method name of method for providing an SQL
9898
*/
99-
// @formatter:on
10099
String method() default "";
101100

102101
/**

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,12 +25,10 @@
2525
import org.apache.ibatis.type.TypeHandler;
2626
import org.apache.ibatis.type.UnknownTypeHandler;
2727

28-
// @formatter:off
2928
/**
3029
* The annotation that be grouping conditional mapping definitions.
3130
* <p>
32-
* <b>How to use:</b>
33-
*
31+
* <b>How to use:</b> <code>
3432
* <pre>
3533
* public interface UserMapper {
3634
* &#064;Select("SELECT id, name, type FROM users ORDER BY id")
@@ -46,10 +44,10 @@
4644
* List&lt;User&gt; selectAll();
4745
* }
4846
* </pre>
47+
* </code>
4948
*
5049
* @author Clinton Begin
5150
*/
52-
// @formatter:on
5351
@Documented
5452
@Retention(RetentionPolicy.RUNTIME)
5553
@Target(ElementType.METHOD)

0 commit comments

Comments
 (0)