test_class.file: shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-boot-starter-infra/src/test/java/org/apache/shardingsphere/spring/boot/util/DataSourceUtilTest.java
test_class.identifier: DataSourceUtilTest
test_case.body: @Test
      public void assertDataSourceForHikariCPAndHyphen() throws ReflectiveOperationException {
          HikariDataSource actual = (HikariDataSource) DataSourceUtil.getDataSource(HikariDataSource.class.getName(), getDataSourcePoolProperties("driver-class-name", "jdbc-url", "username"));
          assertThat(actual.getDriverClassName(), is("org.h2.Driver"));
          assertThat(actual.getJdbcUrl(), is("jdbc:h2:mem:%s;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL"));
          assertThat(actual.getUsername(), is("sa"));
      }
test_case.class_method_signature: DataSourceUtilTest.assertDataSourceForHikariCPAndHyphen()
test_case.full_signature: @Test public void assertDataSourceForHikariCPAndHyphen()
test_case.identifier: assertDataSourceForHikariCPAndHyphen
test_case.invocations: getDataSource getName getDataSourcePoolProperties assertThat getDriverClassName is assertThat getJdbcUrl is assertThat getUsername is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertDataSourceForHikariCPAndHyphen()
focal_class.declarator: SET_METHOD_PREFIX = "set"
focal_class.modifier: private static final
focal_class.original_string: private static final String SET_METHOD_PREFIX = "set";
focal_class.type: String
focal_class.var_name: SET_METHOD_PREFIX
focal_class.declarator: GENERAL_CLASS_TYPE
focal_class.modifier: private static final
focal_class.original_string: private static final Collection<Class<?>> GENERAL_CLASS_TYPE;
focal_class.type: Collection<Class<?>>
focal_class.var_name: GENERAL_CLASS_TYPE
focal_class.file: shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-boot-starter-infra/src/main/java/org/apache/shardingsphere/spring/boot/util/DataSourceUtil.java
focal_class.identifier: DataSourceUtil
focal_class.class_method_signature: DataSourceUtil.getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_class.full_signature: public static DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_class.identifier: getDataSource
focal_class.modifiers: public static
focal_class.parameters: (final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_class.return: DataSource
focal_class.signature: DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_class.class_method_signature: DataSourceUtil.getSetterMethodName(final String propertyName)
focal_class.full_signature: private static String getSetterMethodName(final String propertyName)
focal_class.identifier: getSetterMethodName
focal_class.modifiers: private static
focal_class.parameters: (final String propertyName)
focal_class.return: String
focal_class.signature: String getSetterMethodName(final String propertyName)
focal_class.class_method_signature: DataSourceUtil.callSetterMethod(final DataSource dataSource, final String methodName, final String setterValue)
focal_class.full_signature: private static void callSetterMethod(final DataSource dataSource, final String methodName, final String setterValue)
focal_class.identifier: callSetterMethod
focal_class.modifiers: private static
focal_class.parameters: (final DataSource dataSource, final String methodName, final String setterValue)
focal_class.return: void
focal_class.signature: void callSetterMethod(final DataSource dataSource, final String methodName, final String setterValue)
focal_method.body: public static DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties) throws ReflectiveOperationException {
          DataSource result = (DataSource) Class.forName(dataSourceClassName).newInstance();
          for (Entry<String, Object> entry : dataSourceProperties.entrySet()) {
              callSetterMethod(result, getSetterMethodName(entry.getKey()), null == entry.getValue() ? null : entry.getValue().toString());
          }
          return result;
      }
focal_method.class_method_signature: DataSourceUtil.getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_method.full_signature: public static DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_method.identifier: getDataSource
focal_method.invocations: newInstance forName entrySet callSetterMethod getSetterMethodName getKey getValue toString getValue
focal_method.modifiers: public static
focal_method.parameters: (final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_method.return: DataSource
focal_method.signature: DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)