org.opendaylight.yangtools.yang.model.api.Module.getNotifications()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(101)

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

Module.getNotifications介绍

暂无

代码示例

代码示例来源:origin: opendaylight/yangtools

@Override
public Set<NotificationDefinition> getNotifications() {
  final Set<NotificationDefinition> notifications = new HashSet<>();
  for (Module m : getModules()) {
    notifications.addAll(m.getNotifications());
  }
  return notifications;
}

代码示例来源:origin: org.opendaylight.yangtools/yang-model-util

@Override
public Set<NotificationDefinition> getNotifications() {
  final Set<NotificationDefinition> notifications = new HashSet<>();
  for (Module m : getModules()) {
    notifications.addAll(m.getNotifications());
  }
  return notifications;
}

代码示例来源:origin: org.opendaylight.yangtools/yang-model-util

private static NotificationDefinition getNotificationByName(final Module module, final QName name) {
  for (final NotificationDefinition notification : module.getNotifications()) {
    if (notification.getQName().equals(name)) {
      return notification;
    }
  }
  return null;
}

代码示例来源:origin: opendaylight/yangtools

private static NotificationDefinition getNotificationByName(final Module module, final QName name) {
  for (final NotificationDefinition notification : module.getNotifications()) {
    if (notification.getQName().equals(name)) {
      return notification;
    }
  }
  return null;
}

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

static List<TypeDefinition<?>> getAllTypedefs(final Module module) {
  final List<TypeDefinition<?>> ret = new ArrayList<>();
  fillRecursively(ret, module);
  final Set<NotificationDefinition> notifications = module.getNotifications();
  for (NotificationDefinition notificationDefinition : notifications) {
    fillRecursively(ret, notificationDefinition);
  }
  final Set<RpcDefinition> rpcs = module.getRpcs();
  for (RpcDefinition rpcDefinition : rpcs) {
    ret.addAll(rpcDefinition.getTypeDefinitions());
    fillRecursively(ret, rpcDefinition.getInput());
    fillRecursively(ret, rpcDefinition.getOutput());
  }
  return ret;
}

代码示例来源:origin: org.opendaylight.yangtools/yang-model-util

private void traverseModule(final DataNodeContainer dataNode) {
  final Module module;
  if (dataNode instanceof Module) {
    module = (Module) dataNode;
  } else {
    return;
  }
  final Set<NotificationDefinition> notifications = module.getNotifications();
  for (NotificationDefinition notificationDefinition : notifications) {
    traverse(notificationDefinition);
  }
  final Set<RpcDefinition> rpcs = module.getRpcs();
  for (RpcDefinition rpcDefinition : rpcs) {
    this.allTypedefs.addAll(rpcDefinition.getTypeDefinitions());
    ContainerSchemaNode input = rpcDefinition.getInput();
    if (input != null) {
      traverse(input);
    }
    ContainerSchemaNode output = rpcDefinition.getOutput();
    if (output != null) {
      traverse(output);
    }
  }
}

代码示例来源:origin: opendaylight/yangtools

private void traverseModule(final DataNodeContainer dataNode) {
  final Module module;
  if (dataNode instanceof Module) {
    module = (Module) dataNode;
  } else {
    return;
  }
  final Set<NotificationDefinition> notifications = module.getNotifications();
  for (NotificationDefinition notificationDefinition : notifications) {
    traverse(notificationDefinition);
  }
  final Set<RpcDefinition> rpcs = module.getRpcs();
  for (RpcDefinition rpcDefinition : rpcs) {
    this.allTypedefs.addAll(rpcDefinition.getTypeDefinitions());
    ContainerSchemaNode input = rpcDefinition.getInput();
    if (input != null) {
      traverse(input);
    }
    ContainerSchemaNode output = rpcDefinition.getOutput();
    if (output != null) {
      traverse(output);
    }
  }
}

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

checkArgument(module != null, "Module reference cannot be NULL.");
checkArgument(module.getName() != null, "Module name cannot be NULL.");
final Set<NotificationDefinition> notifications = module.getNotifications();
checkState(notifications != null, "Set of notification from module " + module.getName() + " cannot be NULL.");
if (notifications.isEmpty()) {

代码示例来源:origin: org.opendaylight.yangtools/yang-model-export

private void emitBodyNodes(final Module input) {
  for (final ExtensionDefinition extension : input.getExtensionSchemaNodes()) {
    emitExtension(extension);
  }
  for (final FeatureDefinition definition : input.getFeatures()) {
    emitFeature(definition);
  }
  for (final IdentitySchemaNode identity : input.getIdentities()) {
    emitIdentity(identity);
  }
  for (final Deviation deviation : input.getDeviations()) {
    emitDeviation(deviation);
  }
  emitDataNodeContainer(input);
  for (final AugmentationSchemaNode augmentation : input.getAugmentations()) {
    emitAugment(augmentation);
  }
  for (final RpcDefinition rpc : input.getRpcs()) {
    emitRpc(rpc);
  }
  emitNotifications(input.getNotifications());
}

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

final Module module = context.module();
checkArgument(module.getName() != null, "Module name cannot be NULL.");
final Set<NotificationDefinition> notifications = module.getNotifications();
if (notifications.isEmpty()) {
  return;

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

Set<NotificationDefinition> _notifications = module.getNotifications();
boolean _isNullOrEmpty_8 = IterableExtensions.isNullOrEmpty(_notifications);
boolean _not_8 = (!_isNullOrEmpty_8);
 _builder.newLine();
 _builder.append("    ");
 Set<NotificationDefinition> _notifications_1 = module.getNotifications();
 CharSequence _writeNotifications = YangTemplate.writeNotifications(_notifications_1);
 _builder.append(_writeNotifications, "    ");

相关文章