code: public static void registerParams(DynamicJasperDesign jd, Map _parameters) {
          for (Object key : _parameters.keySet()) {
              if (key instanceof String) {
                  try {
                      Object value = _parameters.get(key);
                      if (jd.getParametersMap().get(key) != null) {
                          log.warn("Parameter \"" + key + "\" already registered, skipping this one: " + value);
                          continue;
                      }
  
                      JRDesignParameter parameter = new JRDesignParameter();
  
                      if (value == null) //There are some Map implementations that allows nulls values, just go on
                          continue;
  
  //					parameter.setValueClassName(value.getClass().getCanonicalName());
                      Class clazz = value.getClass().getComponentType();
                      if (clazz == null)
                          clazz = value.getClass();
                      parameter.setValueClass(clazz); //NOTE this is very strange
                      //when using an array as subreport-data-source, I must pass the parameter class name like this: value.getClass().getComponentType()
                      parameter.setName((String) key);
                      jd.addParameter(parameter);
                  } catch (JRException e) {
                      //nothing to do
                  }
              }
  
          }
  
      }
docs: For every String key, it registers the object as a parameter to make it available
  in the report.
  
  @param jd
  @param _parameters