gpt4 book ai didi

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

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

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

YangType.setDataTypeExtendedInfo介绍

[英]Sets the data type meta data.
[中]设置元数据的数据类型。

代码示例

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

/**
 * Sets the default require instance value as true when the type is instance identifier.
 *
 * @param type type to which the value has to be set
 */
private static void setDefaultRequireInstanceForInstanceIdentifier(YangType<?> type) {
  if (type.getDataType() == INSTANCE_IDENTIFIER) {
    ((YangType<Boolean>) type).setDataTypeExtendedInfo(true);
  }
}

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

case TYPE_DATA: {
  YangType<YangBits> typeNode = (YangType<YangBits>) tmpNode;
  typeNode.setDataTypeExtendedInfo(bitsNode);
  break;

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

case TYPE_DATA: {
  YangType<YangUnion> typeNode = (YangType<YangUnion>) tmpNode;
  typeNode.setDataTypeExtendedInfo(unionNode);
  break;

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

case TYPE_DATA: {
  YangType<YangEnumeration> typeNode = (YangType<YangEnumeration>) tmpNode;
  typeNode.setDataTypeExtendedInfo(enumerationNode);
  break;

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

ctx.baseStatement().string().getText(), BASE_DATA, ctx);
idRef.setBaseIdentity(nodeId);
((YangType) typeData).setDataTypeExtendedInfo(idRef);

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

/**
 * It is called when parser enters grammar rule (decimal64), it perform
 * validations and updates the data model tree.
 *
 * @param listener listener's object
 * @param ctx      context object of the grammar rule
 */
public static void processDecimal64Entry(TreeWalkListener listener,
                     Decimal64SpecificationContext ctx) {
  // Check for stack to be non empty.
  checkStackIsNotEmpty(listener, MISSING_HOLDER, DECIMAL64_DATA, "", ENTRY);
  Parsable tmpNode = listener.getParsedDataStack().peek();
  if (tmpNode instanceof YangType) {
    YangType<YangDecimal64<YangRangeRestriction>> typeNode =
        (YangType<YangDecimal64<YangRangeRestriction>>) tmpNode;
    YangDecimal64 decimal64Node = new YangDecimal64();
    typeNode.setDataTypeExtendedInfo(decimal64Node);
    decimal64Node.setLineNumber(ctx.getStart().getLine());
    decimal64Node.setCharPosition(ctx.getStart().getCharPositionInLine());
    decimal64Node.setFileName(listener.getFileName());
  } else {
    throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, DECIMAL64_DATA, "", ENTRY));
  }
}

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

((YangType) curData).setDataTypeExtendedInfo(isRequireInstance);
} else {
  throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, REQUIRE_INSTANCE_DATA,

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

type.setDataTypeExtendedInfo(leafRef);

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

dataType.setDataTypeExtendedInfo(potentialTypeNode);
return;

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

yangDerivedInfo.setCharPosition(ctx.getStart().getCharPositionInLine());
yangDerivedInfo.setFileName(listener.getFileName());
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
yangDerivedInfo.setCharPosition(ctx.getStart().getCharPositionInLine());
yangDerivedInfo.setFileName(listener.getFileName());
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
yangDerivedInfo.setCharPosition(ctx.getStart().getCharPositionInLine());
yangDerivedInfo.setFileName(listener.getFileName());
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
yangDerivedInfo.setCharPosition(ctx.getStart().getCharPositionInLine());
yangDerivedInfo.setFileName(listener.getFileName());
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);

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

strRes.setCharPosition(ctx.getStart().getCharPositionInLine());
  strRes.setLineNumber(ctx.getStart().getLine());
  type.setDataTypeExtendedInfo(strRes);
type.setDataTypeExtendedInfo(lenRes);

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

strRes.setCharPosition(ctx.getStart().getCharPositionInLine());
strRes.setLineNumber(ctx.getStart().getLine());
type.setDataTypeExtendedInfo(strRes);

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

.setRangeRestrictedExtendedInfo(ranRes);
} else {
  type.setDataTypeExtendedInfo(ranRes);

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