code: public static AlgorithmParameterGenerator getInstance(String algorithm)
          throws NoSuchAlgorithmException {
              try {
                  Object[] objs = Security.getImpl(algorithm,
                                                   "AlgorithmParameterGenerator",
                                                   (String)null);
                  return new AlgorithmParameterGenerator
                      ((AlgorithmParameterGeneratorSpi)objs[0],
                       (Provider)objs[1],
                       algorithm);
              } catch(NoSuchProviderException e) {
                  throw new NoSuchAlgorithmException(algorithm + " not found");
              }
      }
docs: Returns an AlgorithmParameterGenerator object for generating
  a set of parameters to be used with the specified algorithm.
  
  <p> This method traverses the list of registered security Providers,
  starting with the most preferred Provider.
  A new AlgorithmParameterGenerator object encapsulating the
  AlgorithmParameterGeneratorSpi implementation from the first
  Provider that supports the specified algorithm is returned.
  
  <p> Note that the list of registered providers may be retrieved via
  the {@link Security#getProviders() Security.getProviders()} method.
  
  @param algorithm the name of the algorithm this
  parameter generator is associated with.
  See the AlgorithmParameterGenerator section in the <a href=
  "{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/StandardNames.html#AlgorithmParameterGenerator">
  Java Cryptography Architecture Standard Algorithm Name Documentation</a>
  for information about standard algorithm names.
  
  @return the new AlgorithmParameterGenerator object.
  
  @exception NoSuchAlgorithmException if no Provider supports an
  AlgorithmParameterGeneratorSpi implementation for the
  specified algorithm.
  
  @see Provider