Пример #1
0
 /** Add a renderer to a hierarchy passed as parameter. */
 public static void addRenderer(
     RendererSupport repository, String renderedClassName, String renderingClassName) {
   LogLog.debug(
       "Rendering class: ["
           + renderingClassName
           + "], Rendered class: ["
           + renderedClassName
           + "].");
   ObjectRenderer renderer =
       (ObjectRenderer)
           OptionConverter.instantiateByClassName(renderingClassName, ObjectRenderer.class, null);
   if (renderer == null) {
     LogLog.error("Could not instantiate renderer [" + renderingClassName + "].");
     return;
   } else {
     try {
       Class renderedClass = Loader.loadClass(renderedClassName);
       repository.setRenderer(renderedClass, renderer);
     } catch (ClassNotFoundException e) {
       LogLog.error("Could not find class [" + renderedClassName + "].", e);
     }
   }
 }