At 06:27 PM 1/4/2005, Mark Womack wrote:
Not a bad idea per se, but what is the motivation with making it an
interface? Will the outside world need to know about the Component
interface in any way? Do we intend to reference log4j objects as Component
or maybe use it as a marker interface?
No, log4j objects will not be referenced as Component. It is not a
marker interface either.
The requirement to have both Component as an interface and
ComponentBase as a class, stems from the fact that we make the
distinction between Appender the interface and AppenderSkeleton the
class. Implementations of Appender derive from AppenderSkeleton but
all the other code in log4j refers to Appender and is oblivious to the
existence of AppenderSkeleton.
If we just need this internally for log4j then we could just add it as a
method on ComponentBase, and be done with it. If we want external
developers to code their implementations to include this method (and not be
required to extend ComponentBase or AppenderSkeleton), then having it in an
interface makes sense.
?
ComponentBase is just an implementation of the Component interface.
I'm all for having interfaces instead of concrete parent classes, but just
having an interface to have an interface is my question.
Good question. However, the same question can be asked about Appender
the interface and AppenderSkeleton the class.
-Mark
--
Ceki G�lc�
The complete log4j manual: http://www.qos.ch/log4j/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]