gpt4 book ai didi

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

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

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

YangNodeIdentifier.<init>介绍

[英]Creates an instance of YANG node identifier.
[中]创建节点标识符的实例。

代码示例

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

/**
 * Creates a YANG type object.
 */
public YangType() {
  nodeId = new YangNodeIdentifier();
  resolvableStatus = UNRESOLVED;
}

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

/**
 * Resets the class attributes to its default value.
 */
public void resetYangType() {
  nodeId = new YangNodeIdentifier();
  resolvableStatus = UNRESOLVED;
  dataType = null;
  dataTypeExtendedInfo = null;
}

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

public YangIdentityRef() {
  super(YangNodeType.IDENTITYREF_NODE, null);
  baseIdentity = new YangNodeIdentifier();
  resolvableStatus = UNRESOLVED;
}

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

/**
 * Creates an YANG uses node.
 */
public YangUses() {
  super(USES_NODE, null);
  nodeIdentifier = new YangNodeIdentifier();
  resolvableStatus = UNRESOLVED;
  ifFeatureList = new LinkedList<>();
  entityToResolveInfoList = new LinkedList<>();
}

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

/**
 * Checks and return valid node identifier.
 *
 * @param nodeIdentifierString string from yang file
 * @param yangConstruct        yang construct for creating error message
 * @return valid node identifier
 */
static YangNodeIdentifier getValidNodeIdentifier(String nodeIdentifierString,
                         YangConstructType yangConstruct) {
  String[] tmpData = nodeIdentifierString.split(Pattern.quote(COLON));
  if (tmpData.length == 1) {
    YangNodeIdentifier nodeIdentifier = new YangNodeIdentifier();
    nodeIdentifier.setName(getValidIdentifier(tmpData[0], yangConstruct));
    return nodeIdentifier;
  } else if (tmpData.length == 2) {
    YangNodeIdentifier nodeIdentifier = new YangNodeIdentifier();
    nodeIdentifier.setPrefix(getValidIdentifier(tmpData[0], yangConstruct));
    nodeIdentifier.setName(getValidIdentifier(tmpData[1], yangConstruct));
    return nodeIdentifier;
  } else {
    throw new LinkerException("YANG file error : " +
                     getYangConstructType(yangConstruct) + " name " +
                     nodeIdentifierString + " is not valid.");
  }
}

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

String[] tmpData = tmpIdentifierString.split(Pattern.quote(COLON));
if (tmpData.length == 1) {
  YangNodeIdentifier nodeIdentifier = new YangNodeIdentifier();
  nodeIdentifier.setName(getValidIdentifier(tmpData[0], yangConstruct, ctx));
  return nodeIdentifier;
} else if (tmpData.length == 2) {
  YangNodeIdentifier nodeIdentifier = new YangNodeIdentifier();
  nodeIdentifier.setPrefix(getValidIdentifier(tmpData[0], yangConstruct, ctx));
  nodeIdentifier.setName(getValidIdentifier(tmpData[1], yangConstruct, ctx));

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