Class ConfigSectionNode
java.lang.Object
io.github.theword.queqiao.core.config.schema.ConfigNode
io.github.theword.queqiao.core.config.schema.ConfigSectionNode
配置区块节点
它不是具体配置值,而是配置树中的一个区域(如 websocket_server)。
携带排版元数据:注释、前后空行数。
不可变:所有配置方法返回新实例,便于安全共享与并发快照。
- Since:
- 0.6.12
-
Method Summary
Modifier and TypeMethodDescriptionblankLinesAfter(int count) 设置区块后的空行数(只影响生成格式,不影响配置语义)blankLinesBefore(int count) 设置区块前的空行数(只影响生成格式,不影响配置语义)设置注释(覆盖)intintstatic ConfigSectionNode创建一个空区块Methods inherited from class io.github.theword.queqiao.core.config.schema.ConfigNode
getCommentLines, getName, getPath, lines, toString
-
Method Details
-
of
创建一个空区块- Parameters:
path- 完整点分路径- Returns:
- 区块节点
-
comment
设置注释(覆盖)- Parameters:
commentLines- 注释行- Returns:
- 新实例
-
blankLinesBefore
设置区块前的空行数(只影响生成格式,不影响配置语义)- Parameters:
count- 空行数- Returns:
- 新实例
-
blankLinesAfter
设置区块后的空行数(只影响生成格式,不影响配置语义)- Parameters:
count- 空行数- Returns:
- 新实例
-
getChildren
- Returns:
- 子节点(有序,只读)
-
getBlankLinesBefore
public int getBlankLinesBefore() -
getBlankLinesAfter
public int getBlankLinesAfter()
-