@Preview(value="3.5") public class ChainDecl extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
driver |
protected String |
id |
protected Map<String,Object> |
meta |
protected Map<String,NodeDecl> |
nodes |
protected String |
title |
| Constructor and Description |
|---|
ChainDecl(String id) |
ChainDecl(String id,
String title) |
ChainDecl(String id,
String title,
String driver) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(NodeDecl nodeDecl)
添加节点
|
protected Map<String,Object> |
buildDom() |
static ChainDecl |
copy(Chain chain)
复制
|
Chain |
create() |
Chain |
create(Consumer<ChainDecl> declaration) |
static ChainDecl |
parseByDom(org.noear.snack.ONode dom)
解析配置文档模型
|
static ChainDecl |
parseByText(String text)
解析配置文本
|
static ChainDecl |
parseByUri(String uri)
解析配置文件
|
void |
removeNode(String nodeId)
移除节点
|
String |
toJson()
转为 json
|
String |
toYaml()
转为 yaml
|
protected final String id
protected final String title
protected final String driver
public ChainDecl(String id)
public Chain create()
public void removeNode(String nodeId)
public void addNode(NodeDecl nodeDecl)
public static ChainDecl parseByText(String text)
text - 配置文本(支持 yml, json 格式)public static ChainDecl parseByDom(org.noear.snack.ONode dom)
dom - 配置文档模型public String toYaml()
public String toJson()
Copyright © 2025. All rights reserved.