classes = map.get(FacesRenderer.class);
if (classes != null && !classes.isEmpty())
{
for (Class<?> clazz : classes)
{
FacesRenderer rend = (FacesRenderer) clazz
.getAnnotation(FacesRenderer.class);
if (rend != null)
{
String renderKitId = rend.renderKitId();
if (renderKitId == null)
{
renderKitId = RenderKitFactory.HTML_BASIC_RENDER_KIT;
}
if (log.isLoggable(Level.FINEST))
{
log.finest("addRenderer(" + renderKitId + ", "
+ rend.componentFamily() + ", " + rend.rendererType()
+ ", " + clazz.getName() + ")");
}
org.apache.myfaces.config.impl.digester.elements.RenderKitImpl renderKit =
(org.apache.myfaces.config.impl.digester.elements.RenderKitImpl)
facesConfig.getRenderKit(renderKitId);
if (renderKit == null)
{
renderKit = new org.apache.myfaces.config.impl.digester.elements.RenderKitImpl();
renderKit.setId(renderKitId);
facesConfig.addRenderKit(renderKit);
}
org.apache.myfaces.config.impl.digester.elements.RendererImpl renderer =
new org.apache.myfaces.config.impl.digester.elements.RendererImpl();
renderer.setComponentFamily(rend.componentFamily());
renderer.setRendererClass(clazz.getName());
renderer.setRendererType(rend.rendererType());
renderKit.addRenderer(renderer);
}
}
}