code: public static final TreeRenderer getInstance(String className)
      {
          TreeRenderer renderer = null;
          if (className != null) {
              className = className.trim();
  
              // create an instance of the def template formatter class
              ClassLoader cl = DiscoveryUtils.getClassLoader();
              try {
                  Class rendererClass = cl.loadClass(className);
                  if (!TreeRenderer.class.isAssignableFrom(rendererClass)) {
                      _log.error("The tree renderer class, " + className
                              + ", does not extend TreeRenderer.");
                  }
                  else {
                      renderer = (TreeRenderer) rendererClass.newInstance();
                  }
              }
              catch ( ClassNotFoundException e ) {
                  _log.error( "Could not find TreeRenderer class " + className, e );
              }
              catch (InstantiationException e) {
                  _log.error( "Could not instantiate TreeRenderer class " + className, e );
              }
              catch (IllegalAccessException e) {
                  _log.error( "Could not instantiate TreeRenderer class " + className, e );
              }
          }
          return renderer;
      }
docs: Create an instance of a {@link TreeRenderer} object given a class
  name. The given class must extend the {@link TreeRenderer} base class.
  
  @param className the name of the TreeRenderer class to instantiate
  @return the new {@link TreeRenderer} instance