@Test public void getClassesViaHardcoded_classesPresent() throws Exception { List<Class<?>> classes = NameResolverProvider.getHardCodedClasses(); assertThat(classes).hasSize(1); assertThat(classes.get(0).getName()).isEqualTo("io.grpc.internal.DnsNameResolverProvider"); }
@VisibleForTesting static final List<Class<?>> getHardCodedClasses() { try { return Collections.<Class<?>>singletonList( Class.forName("io.grpc.internal.DnsNameResolverProvider")); } catch (ClassNotFoundException e) { logger.log(Level.FINE, "Unable to find DNS NameResolver", e); } return Collections.emptyList(); }
NameResolverProvider extends NameResolver.Factory { @VisibleForTesting static final List<Class<?>> getHardCodedClasses() { try { return Collections.<Class<?>>singletonList( Class.forName("io.grpc.internal.DnsNameResolverProvider")); } catch (ClassNotFoundException e) { logger.log(Level.FINE, "Unable to find DNS NameResolver", e); } return Collections.emptyList(); } }
NameResolverProvider extends NameResolver.Factory { @VisibleForTesting static final List<Class<?>> getHardCodedClasses() { try { return Collections.<Class<?>>singletonList( Class.forName("io.grpc.internal.DnsNameResolverProvider")); } catch (ClassNotFoundException e) { logger.log(Level.FINE, "Unable to find DNS NameResolver", e); } return Collections.emptyList(); }  }
NameResolverProvider extends NameResolver.Factory { @VisibleForTesting static final List<Class<?>> getHardCodedClasses() { try { return Collections.<Class<?>>singletonList( Class.forName("io.grpc.internal.DnsNameResolverProvider")); } catch (ClassNotFoundException e) { logger.log(Level.FINE, "Unable to find DNS NameResolver", e); } return Collections.emptyList(); }  static List<NameResolverProvider> providers(); static NameResolver.Factory asFactory(); }
NameResolverProvider extends NameResolver.Factory { @VisibleForTesting static final List<Class<?>> getHardCodedClasses() { try { return Collections.<Class<?>>singletonList( Class.forName("io.grpc.internal.DnsNameResolverProvider")); } catch (ClassNotFoundException e) { logger.log(Level.FINE, "Unable to find DNS NameResolver", e); } return Collections.emptyList(); }  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; }