[jdom-interest] Common interfaces..

Paul Jakubik pauljakubik at yahoo.com
Wed May 2 14:09:25 PDT 2001

The Visitor interface can be implemented without any
of the JDOM objects having a common interface.

A common interface for visitable entities would be
useful anywhere a heterogeneous list of these entities
is kept, since the implementation would not have to
differentiate between the kinds of entities being
visited (Visitors double dispatch is used to figure
out the type instead--the Visitor would still have
explicit methods for each type).


--- wes at tralfamadore.com wrote:
> Not that anyone cares, but for the record, I remain
> completely against common interfaces/base classes
> for
> I am quite willing to change my mind if someone can
> answer Jason's question: "What common methods and
> properties would these classes support?"
> For instance, I can't come up with a common
> interface
> for, say, CDATA and Attribute, other than that they
> both have an Element as a parent.
> Most of the use cases being tossed around here are
> for
> applications external to the data model (which is
> JDOM's core and IMHO only business).  
> To address these, implementing a generic Visitor
> pattern might be useful, but it's unfortunately not
> a
> standardized Java pattern.  That is, it would be
> nice
> if there were java.util.Visitable/java.util.Visitor
> interfaces -- it doesn't seem like those belong in
> org.jdom.
> Cheers
> Wes
> _______________________________________________
> To control your jdom-interest membership:

Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

More information about the jdom-interest mailing list