public static synchronized NameResolverRegistry getDefaultRegistry() {
    if (instance == null) {
      List<NameResolverProvider> providerList = ServiceProviders.loadAll(
          NameResolverProvider.class,
          getHardCodedClasses(),
          NameResolverProvider.class.getClassLoader(),
          new NameResolverPriorityAccessor());
      if (providerList.isEmpty()) {
        logger.warning("No NameResolverProviders found via ServiceLoader, including for DNS. This "
            + "is probably due to a broken build. If using ProGuard, check your configuration");
      }
      instance = new NameResolverRegistry();
      for (NameResolverProvider provider : providerList) {
        logger.fine("Service loader found " + provider);
        if (provider.isAvailable()) {
          instance.addProvider(provider);
        }
      }
      instance.refreshProviders();
    }
    return instance;
  }
public static synchronized NameResolverRegistry getDefaultRegistry ( ) { if ( instance == null ) { List < NameResolverProvider > providerList = ServiceProviders . loadAll ( NameResolverProvider . class , getHardCodedClasses ( ) , NameResolverProvider . class . getClassLoader ( ) , new NameResolverPriorityAccessor ( ) ) ; if ( providerList . isEmpty ( ) ) { logger . warning ( "No NameResolverProviders found via ServiceLoader, including for DNS. This " + "is probably due to a broken build. If using ProGuard, check your configuration" ) ; } instance = new NameResolverRegistry ( ) ; for ( NameResolverProvider provider : providerList ) { logger . fine ( "Service loader found " + provider ) ; if ( provider . isAvailable ( ) ) { instance . addProvider ( provider ) ; } } instance . refreshProviders ( ) ; } return instance ; }
Returns the default registry that loads providers via the Java service loader mechanism.