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

x33g5p2x  于2022-02-05 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(81)

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

YangAtomicPath.getPathPredicatesList介绍

[英]Returns the path predicate expression.
[中]返回路径谓词表达式。

代码示例

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

/**
 * Adds predicate expression in data holder.
 *
 * @param predicatesExp the predicate expression to be added
 */
public void addLeavesPredicate(YangPathPredicate predicatesExp) {
  getPathPredicatesList().add(predicatesExp);
}

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

/**
 * Fills the path predicates of the leaf-ref with right axis node and
 * left axis node, after linking the nodes.
 *
 * @param leafRef YANG leaf-ref
 * @throws DataModelException if there is a data model error
 */
public static void fillPathPredicates(YangLeafRef<?> leafRef)
    throws DataModelException {
  List<YangAtomicPath> atomics = leafRef.getAtomicPath();
  if (atomics != null) {
    for (YangAtomicPath atom : atomics) {
      List<YangPathPredicate> predicates =
          atom.getPathPredicatesList();
      if (predicates != null) {
        for (YangPathPredicate predicate : predicates) {
          setLeftAxisNode(leafRef, atom, predicate);
          setRightAxisNode(leafRef, predicate);
        }
      }
    }
  }
}

相关文章