code: public static AlgorithmParameters getInstance(String algorithm,
                                                    Provider provider)
          throws NoSuchAlgorithmException
      {
          if (provider == null)
              throw new IllegalArgumentException("missing provider");
          Object[] objs = Security.getImpl(algorithm, "AlgorithmParameters",
                                           provider);
          return new AlgorithmParameters((AlgorithmParametersSpi)objs[0],
                                         (Provider)objs[1],
                                         algorithm);
      }
docs: Returns a parameter object for the specified algorithm.
  
  <p> A new AlgorithmParameters object encapsulating the
  AlgorithmParametersSpi implementation from the specified Provider
  object is returned.  Note that the specified Provider object
  does not have to be registered in the provider list.
  
  <p>The returned parameter object must be initialized via a call to
  {@code init}, using an appropriate parameter specification or
  parameter encoding.
  
  @param algorithm the name of the algorithm requested.
  See the AlgorithmParameters section in the <a href=
  "{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/StandardNames.html#AlgorithmParameters">
  Java Cryptography Architecture Standard Algorithm Name Documentation</a>
  for information about standard algorithm names.
  
  @param provider the name of the provider.
  
  @return the new parameter object.
  
  @exception NoSuchAlgorithmException if an AlgorithmParameterGeneratorSpi
  implementation for the specified algorithm is not available
  from the specified Provider object.
  
  @exception IllegalArgumentException if the provider is null.
  
  @see Provider
  
  @since 1.4