gpt4 book ai didi

org.onosproject.yang.compiler.datamodel.YangNode.setParent()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 12:53:31 30 4
gpt4 key购买 nike

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

YangNode.setParent介绍

[英]Sets the parent of node.
[中]设置节点的父节点。

代码示例

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

@Override
public YangNode clone(YangUses node, boolean isDeviation, boolean isAnyData) throws
    CloneNotSupportedException {
  YangNode clnNode = (YangNode) super.clone();
  clnNode.setParent(null);
  clnNode.setChild(null);
  clnNode.setNextSibling(null);
  clnNode.setPreviousSibling(null);
  return clnNode;
}

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

private static void processHierarchyChild(YangNode node,
                     Map<YangNode, List<YangNode>> map) {
  YangNode child = node.getChild();
  if (child != null) {
    List<YangNode> nodes = new ArrayList<>();
    while (child != null) {
      nodes.add(child);
      child.setParent(null);
      child = child.getNextSibling();
      if (child != null) {
        child.getPreviousSibling().setNextSibling(null);
        child.setPreviousSibling(null);
      }
    }
    map.put(node, nodes);
  }
  node.setChild(null);
}

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

clonedNode.setParent(null);
clonedNode.setChild(null);
clonedNode.setNextSibling(null);

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

while (augChild != null) {
  if (lastChild == logical) {
    augChild.setParent(lastChild);
    try {
      lastChild.addChild(augChild);
    augChild.setParent(lastChild.getParent());
    augChild.setPreviousSibling(lastChild);
    lastChild.setNextSibling(augChild);

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

node.setNextSibling(null);
node.setPreviousSibling(null);
node.setParent(null);
YangCase javaCase = getYangCaseNode(JAVA_GENERATION);
javaCase.setName(node.getName());
node.setParent(javaCase);
javaCase.addChild(node);
node.setNextSibling(null);
node.setPreviousSibling(null);
node.setParent(null);
node.setParent(augment);

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

/**
 * Removes node from data model tree.
 *
 * @param node YANG data model node
 */
public static void deleteUnsupportedNodeFromTree(YangNode node) {
  // unlink from parent
  YangNode parentNode = node.getParent();
  if (parentNode.getChild().equals(node)) {
    parentNode.setChild(node.getNextSibling());
  }
  //unlink from siblings
  YangNode previousSibling = node.getPreviousSibling();
  YangNode nextSibling = node.getNextSibling();
  if (nextSibling != null && previousSibling != null) {
    previousSibling.setNextSibling(nextSibling);
    nextSibling.setPreviousSibling(previousSibling);
  } else if (nextSibling != null) {
    nextSibling.setPreviousSibling(null);
  } else if (previousSibling != null) {
    previousSibling.setNextSibling(null);
  }
  node.setParent(null);
  node.setPreviousSibling(null);
  node.setNextSibling(null);
  node.setChild(null);
}

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

newSibling.setParent(getParent());
} else {
  throw new DataModelException("Node is already part of a tree, " +

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

newChild.setParent(this);
if (this instanceof RpcNotificationContainer) {
  ((RpcNotificationContainer) this).addToIdentityTypedefMap(

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