}
public StatementSplitter resolve()
{
final String sqlDialect = scriptingConfiguration.getSqlDialect();
StatementSplitter resolved = null;
final Collection<StatementSplitter> statementSplitters = new JavaSPIExtensionLoader().all(Thread.currentThread().getContextClassLoader(), StatementSplitter.class);
for (StatementSplitter statementSplitter : statementSplitters)
{
if (statementSplitter.supports().equalsIgnoreCase(sqlDialect))
{
if (resolved != null)
{
throw new IllegalStateException("Found multiple implementations of " + StatementSplitter.class.getName()
+ " for specified dialect " + sqlDialect);
}
resolved = statementSplitter;
resolved.setStatementDelimiter(scriptingConfiguration.getSqlStatementDelimiter());
}
}
if (resolved == null)
{