public Renderer getRenderer(String hint) {
if ( rendererSelector == null ) {
try {
this.rendererSelector = (ServiceSelector)this.manager.lookup( this.rendererSelectorRole );
} catch (ServiceException e) {
throw new CascadingRuntimeException("Unable to lookup renderer selector with role " + this.rendererSelectorRole, e);
}
this.renderers = new HashMap();
}
Renderer o = (Renderer) this.renderers.get( hint );
if ( o == null ) {
try {
o = (Renderer) this.rendererSelector.select( hint );
this.renderers.put( hint, o );
} catch (ServiceException e) {
throw new CascadingRuntimeException("Unable to lookup renderer with hint " + hint, e);
}
}
return o;
}