Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Subclassing and check methods

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: John Cowan <cowan AT ccil.org>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Subclassing and check methods
  • Date: Sat, 13 Mar 2004 09:00:41 -0500

At 10:20 PM -0500 3/12/04, John Cowan wrote:

I don't understand this about atomicity. If you mean that overridden
versions of these in subclasses may not be atomic, it's true -- but
they may be inherently doing things, like inserting dummy elements,
that aren't going to be atomic. AFAICT, the superclass method will
still be atomic.

Thanks. I think you're right. I'm worrying too much about nothing. I was still a little too stuck in the old way of doing things. My concern was that a child could veto its insertion or removal, but that's not how the code actually works now. It's all in the parent. If the subclass overrides the insertChild or removeChild method such that they may throw an exception, then they'll also need to override replaceChild/removeChildren. I just need to document the interactions in the JavaDoc.

John Cowan jcowan AT reutershealth.com www.reutershealth.com www.ccil.org/~cowan
Original line from The Warrior's Apprentice by Lois McMaster Bujold:
"Only on Barrayar would pulling a loaded needler start a stampede toward one."
English-to-Russian-to-English mangling thereof: "Only on Barrayar you risk to
lose support instead of finding it when you threat with the charged weapon."

To be honest, the original sentence makes no more sense to me than the doubly translated one. :-)

--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page