@Test public void newNameResolver_noProvider() { List<NameResolverProvider> providers = Collections.<NameResolverProvider>emptyList(); NameResolver.Factory factory = NameResolverProvider.asFactory(providers); try { factory.newNameResolver(uri, attributes); fail("Expected exception"); } catch (RuntimeException ex) { assertTrue(ex.toString(), ex.getMessage().contains("No NameResolverProviders found")); } }
public static NameResolver.Factory asFactory() { return factory; }
NameResolverProvider extends NameResolver.Factory { public static NameResolver.Factory asFactory() { return factory; } }
NameResolverProvider extends NameResolver.Factory { public static NameResolver.Factory asFactory() { return factory; }  }
NameResolverProvider extends NameResolver.Factory { public static NameResolver.Factory asFactory() { return factory; }  static List<NameResolverProvider> providers(); static NameResolver.Factory asFactory(); }
NameResolverProvider extends NameResolver.Factory { public static NameResolver.Factory asFactory() { return factory; }  static List<NameResolverProvider> providers(); static NameResolver.Factory asFactory(); @SuppressWarnings("unused") // Avoids outside callers accidentally depending on the super class.
  static final Attributes.Key<Integer> PARAMS_DEFAULT_PORT; }