enhancement
A renderer is a rendering algorithm for an object—the type of the object should be parameterized.
Code Migration
Set type parameters in renderer subclasses. This may change the signatures of inherited protected methods. These must also be adapted to the specific type in any subclasses. This generally eliminates the need for a cast in each of these methods.
In places where a renderer is read from a configuration but is used in a generic context (e.g., a table column), this renderer should be defined as `Renderer<?> ` in the configuration property and converted to a generic renderer when used:
#!java
// Config
interface Config {
Renderer<?> getConfiguredRenderer()
}
// Generic API
void setRenderer(Renderer<Object> r) {
...
}
// Conversion
setRenderer(config.getConfiguredRenderer().generic());
Test
Refactoring, no test.