code: public static final CertificateFactory getInstance(String type)
              throws CertificateException {
          try {
              Instance instance = GetInstance.getInstance("CertificateFactory",
                  CertificateFactorySpi.class, type);
              return new CertificateFactory((CertificateFactorySpi)instance.impl,
                  instance.provider, type);
          } catch (NoSuchAlgorithmException e) {
              throw new CertificateException(type + " not found", e);
          }
      }
docs: Returns a certificate factory object that implements the
  specified certificate type.
  
  <p> This method traverses the list of registered security Providers,
  starting with the most preferred Provider.
  A new CertificateFactory object encapsulating the
  CertificateFactorySpi implementation from the first
  Provider that supports the specified type is returned.
  
  <p> Note that the list of registered providers may be retrieved via
  the {@link Security#getProviders() Security.getProviders()} method.
  
  @param type the name of the requested certificate type.
  See the CertificateFactory section in the <a href=
  "{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/StandardNames.html#CertificateFactory">
  Java Cryptography Architecture Standard Algorithm Name Documentation</a>
  for information about standard certificate types.
  
  @return a certificate factory object for the specified type.
  
  @exception CertificateException if no Provider supports a
  CertificateFactorySpi implementation for the
  specified type.
  
  @see java.security.Provider