code: @SuppressWarnings("unchecked")
      protected AgiScript createAgiScriptInstance(String className)
      {
          Class<?> tmpClass;
          Class<AgiScript> agiScriptClass;
          Constructor<AgiScript> constructor;
          AgiScript agiScript;
  
          agiScript = null;
  
          try
          {
              tmpClass = getClassLoader().loadClass(className);
          }
          catch (ClassNotFoundException e1)
          {
              logger.debug("Unable to create AgiScript instance of type " + className
                      + ": Class not found, make sure the class exists and is available on the CLASSPATH");
              return null;
          }
  
          if (!AgiScript.class.isAssignableFrom(tmpClass))
          {
              logger.warn("Unable to create AgiScript instance of type " + className
                      + ": Class does not implement the AgiScript interface");
              return null;
          }
  
          agiScriptClass = (Class<AgiScript>) tmpClass;
          try
          {
              constructor = agiScriptClass.getConstructor();
              agiScript = constructor.newInstance();
          }
          catch (Exception e)
          {
              logger.warn("Unable to create AgiScript instance of type " + className, e);
          }
  
          return agiScript;
      }
docs: Creates a new instance of an AGI script.
  
  @param className Class name of the AGI script. The class must implement
  {@link AgiScript}.
  @return the created instance of the AGI script class. If the instance
  can't be created an error is logged and <code>null</code> is
  returned.