test_class.declarator: metaData
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SchemaMetaData metaData;
test_class.type: SchemaMetaData
test_class.var_name: metaData
test_class.declarator: props
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationProperties props;
test_class.type: ConfigurationProperties
test_class.var_name: props
test_class.file: shardingsphere-infra/shardingsphere-infra-rewrite/shardingsphere-infra-rewrite-engine/src/test/java/org/apache/shardingsphere/infra/rewrite/SQLRewriteEntryTest.java
test_class.identifier: SQLRewriteEntryTest
test_case.body: @Test
      public void assertRewriteForRouteSQLRewriteResult() {
          SQLRewriteEntry sqlRewriteEntry = new SQLRewriteEntry(metaData, props, Collections.emptyList());
          RouteContext routeContext = new RouteContext();
          routeContext.getRouteUnits().addAll(Arrays.asList(mock(RouteUnit.class), mock(RouteUnit.class)));
          RouteSQLRewriteResult sqlRewriteResult = (RouteSQLRewriteResult) sqlRewriteEntry.rewrite("SELECT ?", Collections.singletonList(1), mock(SQLStatementContext.class), routeContext);
          assertThat(sqlRewriteResult.getSqlRewriteUnits().size(), is(2));
      }
test_case.class_method_signature: SQLRewriteEntryTest.assertRewriteForRouteSQLRewriteResult()
test_case.full_signature: @Test public void assertRewriteForRouteSQLRewriteResult()
test_case.identifier: assertRewriteForRouteSQLRewriteResult
test_case.invocations: emptyList addAll getRouteUnits asList mock mock rewrite singletonList mock assertThat size getSqlRewriteUnits is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertRewriteForRouteSQLRewriteResult()
focal_class.declarator: metaData
focal_class.modifier: private final
focal_class.original_string: private final SchemaMetaData metaData;
focal_class.type: SchemaMetaData
focal_class.var_name: metaData
focal_class.declarator: props
focal_class.modifier: private final
focal_class.original_string: private final ConfigurationProperties props;
focal_class.type: ConfigurationProperties
focal_class.var_name: props
focal_class.declarator: decorators
focal_class.modifier: @SuppressWarnings("rawtypes")
      private final
focal_class.original_string: @SuppressWarnings("rawtypes")
      private final Map<ShardingSphereRule, SQLRewriteContextDecorator> decorators;
focal_class.type: Map<ShardingSphereRule, SQLRewriteContextDecorator>
focal_class.var_name: decorators
focal_class.file: shardingsphere-infra/shardingsphere-infra-rewrite/shardingsphere-infra-rewrite-engine/src/main/java/org/apache/shardingsphere/infra/rewrite/SQLRewriteEntry.java
focal_class.identifier: SQLRewriteEntry
focal_class.class_method_signature: SQLRewriteEntry.SQLRewriteEntry(final SchemaMetaData metaData, final ConfigurationProperties props, final Collection<ShardingSphereRule> rules)
focal_class.full_signature: public  SQLRewriteEntry(final SchemaMetaData metaData, final ConfigurationProperties props, final Collection<ShardingSphereRule> rules)
focal_class.identifier: SQLRewriteEntry
focal_class.modifiers: public
focal_class.parameters: (final SchemaMetaData metaData, final ConfigurationProperties props, final Collection<ShardingSphereRule> rules)
focal_class.signature:  SQLRewriteEntry(final SchemaMetaData metaData, final ConfigurationProperties props, final Collection<ShardingSphereRule> rules)
focal_class.class_method_signature: SQLRewriteEntry.rewrite(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_class.full_signature: public SQLRewriteResult rewrite(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_class.identifier: rewrite
focal_class.modifiers: public
focal_class.parameters: (final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_class.return: SQLRewriteResult
focal_class.signature: SQLRewriteResult rewrite(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_class.class_method_signature: SQLRewriteEntry.createSQLRewriteContext(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_class.full_signature: private SQLRewriteContext createSQLRewriteContext(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_class.identifier: createSQLRewriteContext
focal_class.modifiers: private
focal_class.parameters: (final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_class.return: SQLRewriteContext
focal_class.signature: SQLRewriteContext createSQLRewriteContext(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_class.class_method_signature: SQLRewriteEntry.decorate(final Map<ShardingSphereRule, SQLRewriteContextDecorator> decorators, final SQLRewriteContext sqlRewriteContext, final RouteContext routeContext)
focal_class.full_signature: @SuppressWarnings({"unchecked", "rawtypes"}) private void decorate(final Map<ShardingSphereRule, SQLRewriteContextDecorator> decorators, final SQLRewriteContext sqlRewriteContext, final RouteContext routeContext)
focal_class.identifier: decorate
focal_class.modifiers: @SuppressWarnings({"unchecked", "rawtypes"}) private
focal_class.parameters: (final Map<ShardingSphereRule, SQLRewriteContextDecorator> decorators, final SQLRewriteContext sqlRewriteContext, final RouteContext routeContext)
focal_class.return: void
focal_class.signature: void decorate(final Map<ShardingSphereRule, SQLRewriteContextDecorator> decorators, final SQLRewriteContext sqlRewriteContext, final RouteContext routeContext)
focal_method.body: public SQLRewriteResult rewrite(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext) {
          SQLRewriteContext sqlRewriteContext = createSQLRewriteContext(sql, parameters, sqlStatementContext, routeContext);
          return routeContext.getRouteUnits().isEmpty()
                  ? new GenericSQLRewriteEngine().rewrite(sqlRewriteContext) : new RouteSQLRewriteEngine().rewrite(sqlRewriteContext, routeContext);
      }
focal_method.class_method_signature: SQLRewriteEntry.rewrite(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_method.full_signature: public SQLRewriteResult rewrite(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_method.identifier: rewrite
focal_method.invocations: createSQLRewriteContext isEmpty getRouteUnits rewrite rewrite
focal_method.modifiers: public
focal_method.parameters: (final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)
focal_method.return: SQLRewriteResult
focal_method.signature: SQLRewriteResult rewrite(final String sql, final List<Object> parameters, final SQLStatementContext<?> sqlStatementContext, final RouteContext routeContext)