test_class.file: shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/swapper/YamlRuleConfigurationSwapperEngineTest.java
test_class.identifier: YamlRuleConfigurationSwapperEngineTest
test_case.body: @Test
      public void assertSwapToYamlConfigurations() {
          FixtureRuleConfiguration ruleConfig = new FixtureRuleConfiguration();
          ruleConfig.setName("test");
          Collection<YamlRuleConfiguration> actual = new YamlRuleConfigurationSwapperEngine().swapToYamlConfigurations(Collections.singletonList(ruleConfig));
          assertThat(actual.size(), is(1));
          assertThat(((FixtureYamlRuleConfiguration) actual.iterator().next()).getName(), is("test"));
      }
test_case.class_method_signature: YamlRuleConfigurationSwapperEngineTest.assertSwapToYamlConfigurations()
test_case.full_signature: @Test public void assertSwapToYamlConfigurations()
test_case.identifier: assertSwapToYamlConfigurations
test_case.invocations: setName swapToYamlConfigurations singletonList assertThat size is assertThat getName next iterator is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToYamlConfigurations()
focal_class.file: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/YamlRuleConfigurationSwapperEngine.java
focal_class.identifier: YamlRuleConfigurationSwapperEngine
focal_class.class_method_signature: YamlRuleConfigurationSwapperEngine.swapToYamlConfigurations(final Collection<RuleConfiguration> ruleConfigurations)
focal_class.full_signature: @SuppressWarnings("unchecked") public Collection<YamlRuleConfiguration> swapToYamlConfigurations(final Collection<RuleConfiguration> ruleConfigurations)
focal_class.identifier: swapToYamlConfigurations
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (final Collection<RuleConfiguration> ruleConfigurations)
focal_class.return: Collection<YamlRuleConfiguration>
focal_class.signature: Collection<YamlRuleConfiguration> swapToYamlConfigurations(final Collection<RuleConfiguration> ruleConfigurations)
focal_class.class_method_signature: YamlRuleConfigurationSwapperEngine.swapToRuleConfigurations(final Collection<YamlRuleConfiguration> yamlRuleConfigs)
focal_class.full_signature: public Collection<RuleConfiguration> swapToRuleConfigurations(final Collection<YamlRuleConfiguration> yamlRuleConfigs)
focal_class.identifier: swapToRuleConfigurations
focal_class.modifiers: public
focal_class.parameters: (final Collection<YamlRuleConfiguration> yamlRuleConfigs)
focal_class.return: Collection<RuleConfiguration>
focal_class.signature: Collection<RuleConfiguration> swapToRuleConfigurations(final Collection<YamlRuleConfiguration> yamlRuleConfigs)
focal_class.class_method_signature: YamlRuleConfigurationSwapperEngine.swapToRuleConfigurations(final Collection<YamlRuleConfiguration> yamlRuleConfigurations, 
                                                                     final Class<?> ruleConfigurationType, final YamlRuleConfigurationSwapper swapper)
focal_class.full_signature: @SuppressWarnings("unchecked") private Collection<RuleConfiguration> swapToRuleConfigurations(final Collection<YamlRuleConfiguration> yamlRuleConfigurations, 
                                                                     final Class<?> ruleConfigurationType, final YamlRuleConfigurationSwapper swapper)
focal_class.identifier: swapToRuleConfigurations
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (final Collection<YamlRuleConfiguration> yamlRuleConfigurations, 
                                                                     final Class<?> ruleConfigurationType, final YamlRuleConfigurationSwapper swapper)
focal_class.return: Collection<RuleConfiguration>
focal_class.signature: Collection<RuleConfiguration> swapToRuleConfigurations(final Collection<YamlRuleConfiguration> yamlRuleConfigurations, 
                                                                     final Class<?> ruleConfigurationType, final YamlRuleConfigurationSwapper swapper)
focal_class.class_method_signature: YamlRuleConfigurationSwapperEngine.getYamlShortcuts()
focal_class.full_signature: @SneakyThrows(ReflectiveOperationException.class) public static Map<String, Class<?>> getYamlShortcuts()
focal_class.identifier: getYamlShortcuts
focal_class.modifiers: @SneakyThrows(ReflectiveOperationException.class) public static
focal_class.parameters: ()
focal_class.return: Map<String, Class<?>>
focal_class.signature: Map<String, Class<?>> getYamlShortcuts()
focal_method.body: @SuppressWarnings("unchecked")
      public Collection<YamlRuleConfiguration> swapToYamlConfigurations(final Collection<RuleConfiguration> ruleConfigurations) {
          Collection<YamlRuleConfiguration> result = new LinkedList<>();
          for (Entry<RuleConfiguration, YamlRuleConfigurationSwapper> entry : OrderedSPIRegistry.getRegisteredServices(ruleConfigurations, YamlRuleConfigurationSwapper.class).entrySet()) {
              result.add((YamlRuleConfiguration) entry.getValue().swapToYamlConfiguration(entry.getKey()));
          }
          return result;
      }
focal_method.class_method_signature: YamlRuleConfigurationSwapperEngine.swapToYamlConfigurations(final Collection<RuleConfiguration> ruleConfigurations)
focal_method.full_signature: @SuppressWarnings("unchecked") public Collection<YamlRuleConfiguration> swapToYamlConfigurations(final Collection<RuleConfiguration> ruleConfigurations)
focal_method.identifier: swapToYamlConfigurations
focal_method.invocations: entrySet getRegisteredServices add swapToYamlConfiguration getValue getKey
focal_method.modifiers: @SuppressWarnings("unchecked") public
focal_method.parameters: (final Collection<RuleConfiguration> ruleConfigurations)
focal_method.return: Collection<YamlRuleConfiguration>
focal_method.signature: Collection<YamlRuleConfiguration> swapToYamlConfigurations(final Collection<RuleConfiguration> ruleConfigurations)