gpt4 book ai didi

org.opendaylight.yangtools.yang.binding.YangModuleInfo.getYangTextByteSource()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 18:56:49 26 4
gpt4 key购买 nike

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

YangModuleInfo.getYangTextByteSource介绍

[英]Return a ByteSource accessing the YANG text of the module.
[中]返回访问模块文本的字节源。

代码示例

代码示例来源:origin: org.opendaylight.mdsal/yang-binding

/**
   * Return a {@link CharSource} accessing the YANG text of the module.
   *
   * @return A CharSource.
   */
  default CharSource getYangTextCharSource() {
    return getYangTextByteSource().asCharSource(StandardCharsets.UTF_8);
  }
}

代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding-generator-impl

private static YangTextSchemaSource toYangTextSource(final SourceIdentifier identifier,
    final YangModuleInfo moduleInfo) {
  return YangTextSchemaSource.delegateForByteSource(identifier, moduleInfo.getYangTextByteSource());
}

代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding-generator-impl

@Override
public ListenableFuture<? extends YangTextSchemaSource> getSource(
  final SourceIdentifier sourceIdentifier) {
  final YangModuleInfo yangModuleInfo = sourceIdentifierToModuleInfo.get(sourceIdentifier);
  if (yangModuleInfo == null) {
    LOG.debug("Unknown schema source requested: {}, available sources: {}", sourceIdentifier,
      sourceIdentifierToModuleInfo.keySet());
    return Futures.immediateFailedFuture(new SchemaSourceException(
      "Unknown schema source: " + sourceIdentifier));
  }
  return Futures.immediateFuture(YangTextSchemaSource.delegateForByteSource(sourceIdentifier,
    yangModuleInfo.getYangTextByteSource()));
}

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