gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 17:59:31 27 4
gpt4 key购买 nike

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

YangAugment.getLineNumber介绍

暂无

代码示例

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

@Override
public void detectSelfCollision(String identifierName,
                YangConstructType dataType)
    throws DataModelException {
  if (getName().equals(identifierName)) {
    throw new DataModelException(
        "YANG file error: Duplicate input identifier detected, " +
            "same as input \"" +
            getName() + " in " +
            getLineNumber() + " at " +
            getCharPosition() +
            " in " + getFileName() + "\"");
  }
}

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

/**
 * Adds the resolved augment from the cloned uses.
 *
 * @param uses YANG uses
 * @param aug  cloned augment
 * @throws DataModelException data model error
 */
public static void addUnresolvedAugment(YangUses uses, YangAugment aug)
    throws DataModelException {
  if (uses.getCurrentGroupingDepth() == 0) {
    List<YangEntityToResolveInfoImpl> infoList = new LinkedList<>();
    YangEntityToResolveInfoImpl info =
        new YangEntityToResolveInfoImpl<>();
    aug.setResolvableStatus(UNRESOLVED);
    info.setEntityToResolve(aug);
    info = setInformationInEntity(info, aug.getParent(),
                   aug.getCharPosition(),
                   aug.getLineNumber());
    infoList.add(info);
    uses.addEntityToResolve(infoList);
  }
}

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

throw new TranslatorException(
    getErrorMsg(FAILED_TO_ADD_CASE, augment.getName(),
          augment.getLineNumber(), augment.getCharPosition(),
          augment.getFileName()));

代码示例来源: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-linker

throw new LinkerException(getErrorMsg(
      INVALID_TARGET + targetNode.getNodeType(),
      augment.getName(), augment.getLineNumber(),
      augment.getCharPosition(), augment.getFileName()));
throw new LinkerException(getErrorMsg(
    FAILED_TO_LINK, augment.getName(), augment
        .getLineNumber(), augment.getCharPosition(),
    augment.getFileName()));

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