gpt4 book ai didi

org.onosproject.yang.compiler.datamodel.YangAugmentableNode类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 20:22:31 25 4
gpt4 key购买 nike

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

YangAugmentableNode介绍

[英]Represents YANG constructs which can be augmented.
[中]表示可以扩充的杨结构。

代码示例

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

/**
 * Detects collision between augment nodes' children and target nodes'
 * nodes children and also between augment nodes' children and other
 * augmented nodes.
 *
 * @param tgt     target node
 * @param aug     YANG augment
 * @param augRoot augment's root
 */
static void detectCollisionForAugment(YangNode tgt, YangAugment aug,
                   YangNode augRoot) {
  // Detect collision for target node and augment node.
  detectCollision(tgt, aug, augRoot);
  List<YangAugment> infoList = ((YangAugmentableNode) tgt)
      .getAugmentedInfoList();
  // Detect collision for target augment node and current augment node.
  for (YangAugment info : infoList) {
    detectCollision(info, aug, augRoot);
  }
}

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

private void resolveUsesAugment(T entity, YangNode node) {
  YangXpathLinker<T> linker = new YangXpathLinker<T>();
  YangAugment aug = (YangAugment) entity;
  YangNode tgt = linker.processUsesAugLinking(aug.getTargetNode(),
                        (YangUses) node);
  if (tgt != null) {
    if (tgt instanceof YangAugmentableNode) {
      //TODO: collision detection
      ((YangAugmentableNode) tgt).addAugmentation(aug);
      aug.setAugmentedNode(tgt);
      setAugmentedFlagInAncestors(tgt);
      Resolvable resolvable = (Resolvable) entity;
      resolvable.setResolvableStatus(RESOLVED);
      if (tgt instanceof YangInput) {
        linker.addInModuleIfInput(aug, node);
      }
    } else {
      throw new LinkerException(getErrorMsg(
          INVALID_TARGET + tgt.getNodeType(),
          aug.getName(), aug.getLineNumber(),
          aug.getCharPosition(), aug.getFileName()));
    }
  }
}

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

((YangAugmentableNode) clonedNode).cloneAugmentInfo();
if (isAnyData) {
  cloneAugmentedInfo(clonedNode);

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

detectCollisionForAugment(targetNode, augment,
             (YangNode) root);
((YangAugmentableNode) targetNode).addAugmentation(augment);
augment.setAugmentedNode(targetNode);
setAugmentedFlagInAncestors(targetNode);

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

((YangAugmentableNode) this).getAugmentedInfoList();
if (yangAugmentedInfo != null && !yangAugmentedInfo.isEmpty()) {
  for (YangAugment info : yangAugmentedInfo) {
((YangAugmentableNode) clonedNode).getAugmentedInfoList()
    .addAll(clonedYangAugmentedInfo);

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

if (node instanceof YangAugmentableNode) {
  List<YangAugment> augList = ((YangAugmentableNode) node)
      .getAugmentedInfoList();
  for (YangAugment aug : augList) {
    leaf = getLeaf(leftAxisName, aug);

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