Annotation Type 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
     
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      @NotNull java.lang.String[] regex
      If the regex is not empty, the comment will be added to all sub paths if the regex matches the value.
      @NotNull java.lang.String value
      If the content length is 0, the comment will not be added.
    • Element Detail

      • value

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

        e.g. "foobar" will be set

         foo: "bar" # foobar
         
        Returns:
        The content of this comment
        Default:
        ""
      • regex

        @NotNull
        @NotNull java.lang.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.

        Returns:
        The path regexes of this comment
        Default:
        {}