本文整理了Java中org.onosproject.yang.compiler.datamodel.YangDerivedInfo.getEffectiveBuiltInType()
方法的一些代码示例,展示了YangDerivedInfo.getEffectiveBuiltInType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangDerivedInfo.getEffectiveBuiltInType()
方法的具体详情如下:
包路径:org.onosproject.yang.compiler.datamodel.YangDerivedInfo
类名称:YangDerivedInfo
方法名:getEffectiveBuiltInType
[英]Returns effective built-in type.
[中]返回有效的内置类型。
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Returns the derived info if the holder is typedef, the entity is type
* and the effective type is leaf-ref; null otherwise.
*
* @return derived info
*/
private YangDerivedInfo<?> getValidResolvableType() {
YangNode refNode = entityToResolveInfo.getHolderOfEntityToResolve();
T entity = entityToResolveInfo.getEntityToResolve();
if (!(refNode instanceof YangTypeDef) && entity instanceof YangType) {
YangType<?> type = (YangType) entity;
YangDerivedInfo<?> info =
(YangDerivedInfo) type.getDataTypeExtendedInfo();
YangDataTypes dataType = info.getEffectiveBuiltInType();
if ((type.getResolvableStatus() == RESOLVED) &&
(dataType == YangDataTypes.LEAFREF)) {
return info;
}
}
return null;
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
case DERIVED:
return getLeafTypeByDataType(type, ((YangDerivedInfo) type
.getDataTypeExtendedInfo()).getEffectiveBuiltInType());
case LEAFREF:
return getLeafTypeByDataType(type, ((YangLeafRef) type
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
/**
* Validates the requested data-type resolve type in empty or not.
*
* @param dataType the data type
* @return true, for empty resolved data-type; false otherwise
* @deprecated use LeafContextUtil.getLeafType instead
*/
@Deprecated
public static boolean validateEmptyDataType(YangType dataType) {
switch (dataType.getDataType()) {
case DERIVED:
return ((YangDerivedInfo) dataType.getDataTypeExtendedInfo())
.getEffectiveBuiltInType().equals(EMPTY);
case LEAFREF:
YangType type = ((YangLeafRef) dataType
.getDataTypeExtendedInfo())
.getEffectiveDataType();
if (type.getDataType() == DERIVED) {
return ((YangDerivedInfo) type.getDataTypeExtendedInfo())
.getEffectiveBuiltInType().equals(EMPTY);
}
return ((YangLeafRef) dataType.getDataTypeExtendedInfo())
.getEffectiveDataType().getDataType().equals(EMPTY);
case UNION:
return false;
default:
return dataType.getDataType().equals(EMPTY);
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
YangDataTypes dataType = ((YangDerivedInfo) getDataTypeExtendedInfo()).getEffectiveBuiltInType();
if (isOfRangeRestrictedType(dataType)) {
if (((YangDerivedInfo) getDataTypeExtendedInfo()).getResolvedExtendedInfo() == null) {
getDataObjectFromString(value,
((YangDerivedInfo) getDataTypeExtendedInfo())
.getEffectiveBuiltInType());
} else {
if (!((YangRangeRestriction) ((YangDerivedInfo) getDataTypeExtendedInfo())
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
.getDataTypeExtendedInfo()).getEffectiveBuiltInType();
YangDerivedInfo refDerivedInfo = (YangDerivedInfo<?>) baseType.getDataTypeExtendedInfo();
T extendedInfo = (T) refDerivedInfo.getResolvedExtendedInfo();
内容来源于网络,如有侵权,请联系作者删除!