gpt4 book ai didi

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

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

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

YangEntityToResolveInfoImpl.setHolderOfEntityToResolve介绍

暂无

代码示例

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

/**
 * Sets the information needed for adding the entity into resolution
 * list, such as line number, position number and cloned holder node.
 *
 * @param entity  resolvable entity
 * @param holder  cloned holder node
 * @param charPos character position
 * @param lineNum line number
 * @return resolvable entity after setting info
 */
private static YangEntityToResolveInfoImpl<?> setInformationInEntity(
    YangEntityToResolveInfoImpl<?> entity, YangNode holder,
    int charPos, int lineNum) {
  entity.setHolderOfEntityToResolve(holder);
  entity.setCharPosition(charPos);
  entity.setLineNumber(lineNum);
  return entity;
}

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

private void addEntityToStack(T entity, YangNode holder) {
  YangEntityToResolveInfoImpl<T> unResolvedEntityInfo =
      new YangEntityToResolveInfoImpl<>();
  unResolvedEntityInfo.setEntityToResolve(entity);
  unResolvedEntityInfo.setHolderOfEntityToResolve(holder);
  addInPartialResolvedStack(unResolvedEntityInfo);
}

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

/**
 * Creates a resolution information object with all the inputs.
 *
 * @param dataNode           current parsable data node
 * @param holderNode         parent YANG node
 * @param lineNumber         error line number
 * @param charPositionInLine error character position in line
 */
public YangResolutionInfoImpl(T dataNode, YangNode holderNode, int lineNumber,
               int charPositionInLine) {
  entityToResolveInfo = new YangEntityToResolveInfoImpl<>();
  entityToResolveInfo.setEntityToResolve(dataNode);
  entityToResolveInfo.setHolderOfEntityToResolve(holderNode);
  setLineNumber(lineNumber);
  setCharPosition(charPositionInLine);
  partialResolvedStack = new Stack<>();
}

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

private void addUnResolvedTypeDataToStack(YangType refType, YangNode
    ancestorRefNode, T extendedInfo) {
  YangEntityToResolveInfoImpl<YangLeafRef<?>> unResolvedLeafRef =
      new YangEntityToResolveInfoImpl<>();
  YangEntityToResolveInfoImpl<YangType<?>> unResolvedTypeDef =
      new YangEntityToResolveInfoImpl<>();
  if (refType.getDataType() == YangDataTypes.LEAFREF) {
    unResolvedLeafRef.setEntityToResolve((YangLeafRef<?>) extendedInfo);
    unResolvedLeafRef.setHolderOfEntityToResolve(ancestorRefNode);
    addInPartialResolvedStack((YangEntityToResolveInfoImpl<T>) unResolvedLeafRef);
  } else if (refType.getDataType() == YangDataTypes.DERIVED) {
    unResolvedTypeDef.setEntityToResolve(refType);
    unResolvedTypeDef.setHolderOfEntityToResolve(ancestorRefNode);
    addInPartialResolvedStack((YangEntityToResolveInfoImpl<T>) unResolvedTypeDef);
  }
}

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