-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.0.0] (breaking-update) update comments usage.
- Loading branch information
Showing
35 changed files
with
395 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
core/src/main/java/cc/carm/lib/configuration/core/annotation/ConfigComment.java
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
core/src/main/java/cc/carm/lib/configuration/core/annotation/HeaderComment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package cc.carm.lib.configuration.core.annotation; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* 顶部注释,用于给对应配置的顶部添加注释,便于使用者阅读查看。 | ||
* <p>如: | ||
* <blockquote><pre> | ||
* # 注释第一行 | ||
* # 注释第二行 | ||
* foo: "bar" | ||
* </pre></blockquote> | ||
*/ | ||
@Target({ElementType.TYPE, ElementType.FIELD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface HeaderComment { | ||
|
||
/** | ||
* 注释内容,若内容长度为0则会视为一个空行。 | ||
* <p> 如 <b>{"foo","","bar"}</b> | ||
* 会被添加为 | ||
* <blockquote><pre> | ||
* # foo | ||
* | ||
* # bar | ||
* foo: "bar" | ||
* </pre></blockquote> | ||
* | ||
* @return 注释内容 | ||
*/ | ||
@NotNull | ||
String[] value() default ""; | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
core/src/main/java/cc/carm/lib/configuration/core/annotation/InlineComment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package cc.carm.lib.configuration.core.annotation; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* 行内注释,用于给对应配置的所在行添加注释,便于使用者阅读查看。 | ||
* 如: | ||
* <blockquote><pre> | ||
* foo: "bar" # 注释内容 | ||
* </pre></blockquote> | ||
*/ | ||
@Target({ElementType.FIELD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface InlineComment { | ||
|
||
/** | ||
* 注释内容,若内容长度为0则不会添加注释 | ||
* <p> 如 <b>"foobar"</b> 将被设定为 | ||
* <blockquote><pre> | ||
* foo: "bar" # foobar | ||
* </pre></blockquote> | ||
* | ||
* @return 注释内容 | ||
*/ | ||
@NotNull | ||
String value() default ""; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
core/src/main/java/cc/carm/lib/configuration/core/builder/list/ConfigListBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.