Andrew Robinson wrote:
There are static methods on CoreRenderer that I have no idea why they are static. The two in particular that I noticed:

static public void renderStyleClass
static public void renderStyleClasses

These are methods for renderers, why would they be static?

There are some util style classes that are calling them, because of this, I would think these methods should be moved into a Util class and have the Renderer methods invoke the Util ones. IMO, static utility functions do not belong on classes that are meant to be extended. Do others agree, or am I solo on this opinion?
Andrew, isn't the real problem here that these methods should be on XhtmlRenderer or XhtmlUtils as their implementations are Xhtml-specific. I don't have a problem per se with static methods on extendable classes. However, if the class is going to contain extractable static convenience functions, then it is confusing to have both the class itself and a separate Utils class. Given that we have a separate Utils class, these methods shouldn't be on the abstract class.

-- Blake Sullivan

-Andrew

Reply via email to