test_class.declarator: tableRuleConfigurationYamlSwapper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ShardingTableRuleConfigurationYamlSwapper tableRuleConfigurationYamlSwapper;
test_class.type: ShardingTableRuleConfigurationYamlSwapper
test_class.var_name: tableRuleConfigurationYamlSwapper
test_class.declarator: shardingStrategyConfigurationYamlSwapper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ShardingStrategyConfigurationYamlSwapper shardingStrategyConfigurationYamlSwapper;
test_class.type: ShardingStrategyConfigurationYamlSwapper
test_class.var_name: shardingStrategyConfigurationYamlSwapper
test_class.declarator: keyGenerateStrategyConfigurationYamlSwapper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private KeyGenerateStrategyConfigurationYamlSwapper keyGenerateStrategyConfigurationYamlSwapper;
test_class.type: KeyGenerateStrategyConfigurationYamlSwapper
test_class.var_name: keyGenerateStrategyConfigurationYamlSwapper
test_class.declarator: shardingRuleConfigurationYamlSwapper = new ShardingRuleConfigurationYamlSwapper()
test_class.modifier: private final
test_class.original_string: private final ShardingRuleConfigurationYamlSwapper shardingRuleConfigurationYamlSwapper = new ShardingRuleConfigurationYamlSwapper();
test_class.type: ShardingRuleConfigurationYamlSwapper
test_class.var_name: shardingRuleConfigurationYamlSwapper
test_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/test/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationYamlSwapperTest.java
test_class.identifier: ShardingRuleConfigurationYamlSwapperTest
test_case.body: @Test
      public void assertSwapToObjectWithMinProperties() {
          YamlShardingRuleConfiguration yamlConfig = new YamlShardingRuleConfiguration();
          yamlConfig.getTables().put("tbl", mock(YamlTableRuleConfiguration.class));
          ShardingRuleConfiguration actual = shardingRuleConfigurationYamlSwapper.swapToObject(yamlConfig);
          assertThat(actual.getTables().size(), is(1));
          assertTrue(actual.getBindingTableGroups().isEmpty());
          assertTrue(actual.getBroadcastTables().isEmpty());
          assertNull(actual.getDefaultDatabaseShardingStrategy());
          assertNull(actual.getDefaultTableShardingStrategy());
          assertNull(actual.getDefaultKeyGenerateStrategy());
      }
test_case.class_method_signature: ShardingRuleConfigurationYamlSwapperTest.assertSwapToObjectWithMinProperties()
test_case.full_signature: @Test public void assertSwapToObjectWithMinProperties()
test_case.identifier: assertSwapToObjectWithMinProperties
test_case.invocations: put getTables mock swapToObject assertThat size getTables is assertTrue isEmpty getBindingTableGroups assertTrue isEmpty getBroadcastTables assertNull getDefaultDatabaseShardingStrategy assertNull getDefaultTableShardingStrategy assertNull getDefaultKeyGenerateStrategy
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToObjectWithMinProperties()
focal_class.declarator: tableYamlSwapper = new ShardingTableRuleConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ShardingTableRuleConfigurationYamlSwapper tableYamlSwapper = new ShardingTableRuleConfigurationYamlSwapper();
focal_class.type: ShardingTableRuleConfigurationYamlSwapper
focal_class.var_name: tableYamlSwapper
focal_class.declarator: autoTableYamlSwapper = new ShardingAutoTableRuleConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ShardingAutoTableRuleConfigurationYamlSwapper autoTableYamlSwapper = new ShardingAutoTableRuleConfigurationYamlSwapper();
focal_class.type: ShardingAutoTableRuleConfigurationYamlSwapper
focal_class.var_name: autoTableYamlSwapper
focal_class.declarator: shardingStrategyYamlSwapper = new ShardingStrategyConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ShardingStrategyConfigurationYamlSwapper shardingStrategyYamlSwapper = new ShardingStrategyConfigurationYamlSwapper();
focal_class.type: ShardingStrategyConfigurationYamlSwapper
focal_class.var_name: shardingStrategyYamlSwapper
focal_class.declarator: keyGenerateStrategyYamlSwapper = new KeyGenerateStrategyConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final KeyGenerateStrategyConfigurationYamlSwapper keyGenerateStrategyYamlSwapper = new KeyGenerateStrategyConfigurationYamlSwapper();
focal_class.type: KeyGenerateStrategyConfigurationYamlSwapper
focal_class.var_name: keyGenerateStrategyYamlSwapper
focal_class.declarator: algorithmSwapper = new ShardingSphereAlgorithmConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ShardingSphereAlgorithmConfigurationYamlSwapper algorithmSwapper = new ShardingSphereAlgorithmConfigurationYamlSwapper();
focal_class.type: ShardingSphereAlgorithmConfigurationYamlSwapper
focal_class.var_name: algorithmSwapper
focal_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationYamlSwapper.java
focal_class.identifier: ShardingRuleConfigurationYamlSwapper
focal_class.interfaces: implements YamlRuleConfigurationSwapper<YamlShardingRuleConfiguration, ShardingRuleConfiguration>
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.swapToYamlConfiguration(final ShardingRuleConfiguration data)
focal_class.full_signature: @Override public YamlShardingRuleConfiguration swapToYamlConfiguration(final ShardingRuleConfiguration data)
focal_class.identifier: swapToYamlConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: (final ShardingRuleConfiguration data)
focal_class.return: YamlShardingRuleConfiguration
focal_class.signature: YamlShardingRuleConfiguration swapToYamlConfiguration(final ShardingRuleConfiguration data)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.setYamlDefaultStrategies(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.full_signature: private void setYamlDefaultStrategies(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.identifier: setYamlDefaultStrategies
focal_class.modifiers: private
focal_class.parameters: (final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.return: void
focal_class.signature: void setYamlDefaultStrategies(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.setYamlAlgorithms(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.full_signature: private void setYamlAlgorithms(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.identifier: setYamlAlgorithms
focal_class.modifiers: private
focal_class.parameters: (final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.return: void
focal_class.signature: void setYamlAlgorithms(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.swapToObject(final YamlShardingRuleConfiguration yamlConfig)
focal_class.full_signature: @Override public ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig)
focal_class.identifier: swapToObject
focal_class.modifiers: @Override public
focal_class.parameters: (final YamlShardingRuleConfiguration yamlConfig)
focal_class.return: ShardingRuleConfiguration
focal_class.signature: ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.setDefaultStrategies(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.full_signature: private void setDefaultStrategies(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.identifier: setDefaultStrategies
focal_class.modifiers: private
focal_class.parameters: (final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.return: void
focal_class.signature: void setDefaultStrategies(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.setAlgorithms(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.full_signature: private void setAlgorithms(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.identifier: setAlgorithms
focal_class.modifiers: private
focal_class.parameters: (final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.return: void
focal_class.signature: void setAlgorithms(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.getTypeClass()
focal_class.full_signature: @Override public Class<ShardingRuleConfiguration> getTypeClass()
focal_class.identifier: getTypeClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<ShardingRuleConfiguration>
focal_class.signature: Class<ShardingRuleConfiguration> getTypeClass()
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.getRuleTagName()
focal_class.full_signature: @Override public String getRuleTagName()
focal_class.identifier: getRuleTagName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getRuleTagName()
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.getOrder()
focal_class.full_signature: @Override public int getOrder()
focal_class.identifier: getOrder
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getOrder()
focal_method.body: @Override
      public ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig) {
          ShardingRuleConfiguration result = new ShardingRuleConfiguration();
          for (Entry<String, YamlTableRuleConfiguration> entry : yamlConfig.getTables().entrySet()) {
              YamlTableRuleConfiguration tableRuleConfig = entry.getValue();
              tableRuleConfig.setLogicTable(entry.getKey());
              result.getTables().add(tableYamlSwapper.swapToObject(tableRuleConfig));
          }
          for (Entry<String, YamlShardingAutoTableRuleConfiguration> entry : yamlConfig.getAutoTables().entrySet()) {
              YamlShardingAutoTableRuleConfiguration tableRuleConfig = entry.getValue();
              tableRuleConfig.setLogicTable(entry.getKey());
              result.getAutoTables().add(autoTableYamlSwapper.swapToObject(tableRuleConfig));
          }
          result.getBindingTableGroups().addAll(yamlConfig.getBindingTables());
          result.getBroadcastTables().addAll(yamlConfig.getBroadcastTables());
          setDefaultStrategies(yamlConfig, result);
          setAlgorithms(yamlConfig, result);
          return result;
      }
focal_method.class_method_signature: ShardingRuleConfigurationYamlSwapper.swapToObject(final YamlShardingRuleConfiguration yamlConfig)
focal_method.full_signature: @Override public ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig)
focal_method.identifier: swapToObject
focal_method.invocations: entrySet getTables getValue setLogicTable getKey add getTables swapToObject entrySet getAutoTables getValue setLogicTable getKey add getAutoTables swapToObject addAll getBindingTableGroups getBindingTables addAll getBroadcastTables getBroadcastTables setDefaultStrategies setAlgorithms
focal_method.modifiers: @Override public
focal_method.parameters: (final YamlShardingRuleConfiguration yamlConfig)
focal_method.return: ShardingRuleConfiguration
focal_method.signature: ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig)