final <T extends AuthorityFactory> T getAuthorityFactory(final Class<T> type, final String code)
throws NoSuchAuthorityCodeException
{
ensureNonNull("code", code);
String authority = null;
FactoryRegistryException cause = null;
final Collection<AuthorityFactory> factories = getFactories();
final char separator = getSeparator(code);
for (int split = code.lastIndexOf(separator); split >= 0;
split = code.lastIndexOf(separator, split-1))
{