gpt4 book ai didi

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

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

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

YangLeafList.getDataType介绍

[英]Returns the data type.
[中]返回数据类型。

代码示例

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

@Override
public void isValueValid(String value)
    throws DataModelException {
  getDataType().isValidValue(value);
}

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

/**
 * Adds the unresolved constructs to stack which has to be resolved for leafref.
 *
 * @param leavesInfo      YANG leaf or leaf list which holds the type
 * @param ancestorRefNode holder of the YANG leaf or leaf list
 */
private void addUnResolvedLeafRefTypeToStack(T leavesInfo, YangNode ancestorRefNode) {
  YangType refType;
  T extendedInfo;
  if (leavesInfo instanceof YangLeaf) {
    YangLeaf leaf = (YangLeaf) leavesInfo;
    refType = leaf.getDataType();
  } else {
    YangLeafList leafList = (YangLeafList) leavesInfo;
    refType = leafList.getDataType();
  }
  extendedInfo = (T) refType.getDataTypeExtendedInfo();
  addUnResolvedTypeDataToStack(refType, ancestorRefNode, extendedInfo);
}

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

if (currentListOfLeafList != null) {
  for (YangLeafList leafList : currentListOfLeafList) {
    if (leafList.getDataType().getDataType() == ENUMERATION
        || leafList.getDataType().getDataType() == UNION) {
      try {
        YangType<?> clonedType = leafList.getDataType().clone();
        updateClonedTypeRef(clonedType, leavesHolder);
        leafList.setDataType(clonedType);
        e.printStackTrace();
        throw new DataModelException("Could not clone Type node " +
                           leafList.getDataType().getDataTypeName() + " in " +
                           leafList.getDataType().getLineNumber() + " at " +
                           leafList.getDataType().getCharPosition() +
                           " in " + leafList.getDataType().getFileName() + "\"");

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

/**
 * Returns types that has to be resolved for a single leaf/leaf-list.
 * Identifies the object to be leaf/leaf-list and assigns respective
 * parameters to resolve the types under leaf/leaf-list.
 *
 * @param clonedObj  leaf/leaf-list object
 * @param holderNode holder node
 * @param yangUses   YANG uses
 * @return list of resolvable entities in a leaf/leaf-list
 * @throws DataModelException data model error
 */
private static List<YangEntityToResolveInfoImpl> getTypesToBeResolved(
    Object clonedObj, YangNode holderNode,
    YangUses yangUses) throws DataModelException {
  YangType type;
  if (clonedObj instanceof YangLeaf) {
    YangLeaf clonedLeaf = (YangLeaf) clonedObj;
    type = clonedLeaf.getDataType();
    return getUnresolvedTypeList(type.getDataType(), type, holderNode,
                   yangUses, true);
  }
  YangLeafList clonedLeafList = (YangLeafList) clonedObj;
  type = clonedLeafList.getDataType();
  return getUnresolvedTypeList(type.getDataType(), type, holderNode,
                 yangUses, false);
}

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

} else if (getReferredLeafOrLeafList() instanceof YangLeafList) {
  YangLeafList yangLeafList = ((YangLeafList) getReferredLeafOrLeafList());
  YangType baseType = yangLeafList.getDataType();
    YangLeafRef referredLeafRefInfo = (YangLeafRef) yangLeafList.getDataType().getDataTypeExtendedInfo();

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

YangType type = leafList.getDataType();
if (type.getDataType() == DERIVED) {

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