gpt4 book ai didi

org.onosproject.yangutils.datamodel.YangLeafList.setContainedIn()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 13:11:31 27 4
gpt4 key购买 nike

本文整理了Java中org.onosproject.yangutils.datamodel.YangLeafList.setContainedIn()方法的一些代码示例,展示了YangLeafList.setContainedIn()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangLeafList.setContainedIn()方法的具体详情如下:
包路径:org.onosproject.yangutils.datamodel.YangLeafList
类名称:YangLeafList
方法名:setContainedIn

YangLeafList.setContainedIn介绍

[英]Assigns the YANG node in which the leaf is defined.
[中]指定定义叶的节点。

代码示例

代码示例来源:origin: org.onosproject/onos-yang-datamodel

/**
 * Adds the list of leaf-list present under a node to resolution list,
 * after cloning. Under the cloned node, with cloned leaf-list,
 * attributes are set and added to resolution list.
 *
 * @param clonedNode cloned holder
 * @param yangUses   YANG uses
 * @throws CloneNotSupportedException clone not supported error
 * @throws DataModelException         data model error
 */
public static void cloneListOfLeafList(
    YangLeavesHolder clonedNode, YangUses yangUses)
    throws CloneNotSupportedException, DataModelException {
  List<YangLeafList> listOfLeafList = clonedNode.getListOfLeafList();
  if (nonEmpty(listOfLeafList)) {
    List<YangLeafList> clonedList = new LinkedList<>();
    for (YangLeafList leafList : listOfLeafList) {
      YangLeafList clonedLeafList = leafList.clone();
      clonedLeafList.setReferredSchemaLeafList(leafList);
      addUnresolvedType(yangUses, clonedLeafList,
               (YangNode) clonedNode);
      clonedLeafList.setContainedIn(clonedNode);
      clonedList.add(clonedLeafList);
    }
    clonedNode.setListOfLeafList(clonedList);
  }
}

代码示例来源:origin: org.onosproject/onos-yang-utils-parser

leavesHolder = (YangLeavesHolder) tmpData;
  leavesHolder.addLeafList(leafList);
  leafList.setContainedIn(leavesHolder);
} else {
  throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, LEAF_LIST_DATA,

代码示例来源:origin: org.onosproject/onos-yang-datamodel

throw new DataModelException(e.getMessage());
clonedLeafList.setContainedIn(usesParent);
usesParent.addLeafList(clonedLeafList);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com