gpt4 book ai didi

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

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

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

YangType.setResolvableStatus介绍

暂无

代码示例

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

/**
 * Adds resolvable type (leaf-ref) info to resolution list.
 *
 * @param extType resolvable type
 * @param type    YANG type
 * @param holder  holder node
 * @throws DataModelException if there is a data model error
 */
private void addRefTypeInfo(T extType, YangType<T> type, YangNode holder)
    throws DataModelException {
  type.resetYangType();
  type.setResolvableStatus(RESOLVED);
  type.setDataType(YangDataTypes.LEAFREF);
  type.setDataTypeName(LEAFREF);
  type.setDataTypeExtendedInfo(extType);
  YangLeafRef leafRef = (YangLeafRef) extType;
  (leafRef).setResolvableStatus(UNRESOLVED);
  leafRef.setParentNode(holder);
  YangResolutionInfoImpl info = new YangResolutionInfoImpl<>(
      leafRef, holder, getLineNumber(), getCharPosition());
  curRefResolver.addToResolutionList(info, YANG_LEAFREF);
  curRefResolver.resolveSelfFileLinking(YANG_LEAFREF);
}

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

@Override
public Object resolve()
    throws DataModelException {
  /*
   * Check whether the data type is derived.
   */
  if (getDataType() != DERIVED) {
    throw new DataModelException("Linker Error: Resolve should only be called for derived data types. "
                       + " in " +
                       getLineNumber() + " at " +
                       getCharPosition()
                       + " in " + getFileName() + "\"");
  }
  // Check if the derived info is present.
  YangDerivedInfo<?> derivedInfo = (YangDerivedInfo<?>) getDataTypeExtendedInfo();
  if (derivedInfo == null) {
    throw new DataModelException("Linker Error: Derived information is missing. " + " in " +
                       getLineNumber() + " at " +
                       getCharPosition()
                       + " in " + getFileName() + "\"");
  }
  // Initiate the resolution
  try {
    setResolvableStatus(derivedInfo.resolve());
  } catch (DataModelException e) {
    throw new DataModelException(e.getMessage());
  }
  return null;
}

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

((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
type.setResolvableStatus(UNRESOLVED);
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
type.setResolvableStatus(UNRESOLVED);
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
type.setResolvableStatus(UNRESOLVED);

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