注释类型 InlineComment


@Target(FIELD) @Retention(RUNTIME) @Repeatable(InlineComments.class) public @interface InlineComment
Inline comments, add comments to the rows of the corresponding configurations for easy reading and viewing. e.g.
 foo: "bar" # Comment Contents
 
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    @NotNull String[]
    If the regex is not empty, the comment will be added to all sub paths if the regex matches the value.
    @NotNull String
    If the content length is 0, the comment will not be added.
  • 元素详细资料

    • value

      @NotNull @NotNull String value
      If the content length is 0, the comment will not be added.

      e.g. "foobar" will be set

       foo: "bar" # foobar
       
      返回:
      The content of this comment
      默认值:
      ""
    • regex

      @NotNull @NotNull String[] regex
      If the regex is not empty, the comment will be added to all sub paths if the regex matches the value. If the regex is empty, the comment will be added to the current path.

      e.g. for section, set "foo.*.bar" will be set like

         section:
           foo:
             some:
               lover: "bar" <- not matched so no comments
               bar: "foobar" # Comment Contents
             other:
               bar: "foobar" # Comment Contents
       

      Some implements may not support this feature in list values or other complex structures.

      返回:
      The path regexes of this comment
      默认值:
      {}