mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 18:48:20 +08:00
feat!(value): Redesigned the Configuration api
This commit is contained in:
+3
-3
@@ -2,7 +2,7 @@ package cc.carm.lib.configuration.commentable;
|
||||
|
||||
import cc.carm.lib.configuration.annotation.HeaderComment;
|
||||
import cc.carm.lib.configuration.annotation.InlineComment;
|
||||
import cc.carm.lib.configuration.value.meta.ValueMetaType;
|
||||
import cc.carm.lib.configuration.meta.PathMetadata;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -12,11 +12,11 @@ public interface CommentableMetaTypes {
|
||||
/**
|
||||
* Configuration's {@link HeaderComment}
|
||||
*/
|
||||
ValueMetaType<List<String>> HEADER_COMMENTS = ValueMetaType.of(Collections.emptyList());
|
||||
PathMetadata<List<String>> HEADER_COMMENTS = PathMetadata.of(Collections.emptyList());
|
||||
|
||||
/**
|
||||
* Configuration's {@link InlineComment}
|
||||
*/
|
||||
ValueMetaType<String> INLINE_COMMENT_VALUE = ValueMetaType.of();
|
||||
PathMetadata<String> INLINE_COMMENT_VALUE = PathMetadata.of();
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
package cc.carm.lib.configuration.option;
|
||||
|
||||
import cc.carm.lib.easyoptions.OptionType;
|
||||
import cc.carm.lib.configuration.source.option.ConfigurationOption;
|
||||
|
||||
public interface CommentableOptions {
|
||||
|
||||
@@ -8,7 +8,7 @@ public interface CommentableOptions {
|
||||
* Whether to keep modified comments in configuration,
|
||||
* that means we only set comments for values that are not exists in configuration.
|
||||
*/
|
||||
OptionType<Boolean> KEEP_COMMENTS = OptionType.of(true);
|
||||
ConfigurationOption<Boolean> KEEP_COMMENTS = ConfigurationOption.of(true);
|
||||
|
||||
/**
|
||||
* Whether to comment values name that are not exists in configuration and no default value offered.
|
||||
@@ -19,6 +19,6 @@ public interface CommentableOptions {
|
||||
* # foo:
|
||||
* </pre></blockquote>
|
||||
*/
|
||||
OptionType<Boolean> COMMENT_NO_DEFAULT = OptionType.of(true);
|
||||
ConfigurationOption<Boolean> COMMENT_NO_DEFAULT = ConfigurationOption.of(true);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user