[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

org.xml.sax.ContentHandler conflicts with java.net.ContentHandler

  • From: Elliotte Rusty Harold <elharo@m...>
  • To: xml-dev <xml-dev@x...>
  • Date: Sat, 26 Feb 2000 14:08:01 -0800

sax contenthandler
I just noticed something by accident:

Weblogs.java:25: reference to ContentHandler is ambiguous, both class
java.net.ContentHandler in java.net and class org.xml.sax.ContentHandler
in org.xml.sax match
class URIGrabber implements ContentHandler {
 
I do know how to fix this in my own code, but I suspect ContentHandler
is another SAX2 class name that needs to be rethought in light of name
conflicts. java.net.ContentHandler certainly isn't the most used class
in the Java Core API, but I don't think we should gratuitously conflict
with it. I know this error message will be confusing to less experienced
Java programmers.

The name I'd suggest would be "ParserCallback" but there may well be a
better name. Personally, though I really like the idea of getting the
notion of a Callback into a class name. I find callback interfaces to be
one of the trickier notions to get across to my students, at least until
they've finally had the "Aha!" experience with one when they finally
understand what's going on. After that, it's simple. I think it might
help them to get there a little quicker if we put the word "Callback" in
the class name so they knew there was something a little funny about
this interface. 

-- 
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@m... | Writer/Programmer |
+-----------------------+------------------------+-------------------+ 
|               Java I/O (O'Reilly & Associates, 1999)               |
|            http://metalab.unc.edu/javafaq/books/javaio/            |
|   http://www.amazon.com/exec/obidos/ISBN=1565924851/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ | 
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
+----------------------------------+---------------------------------+

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/threads.html
***************************************************************************

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.