[jdom-interest] Bit masks in ContentFilter

Elliotte Rusty Harold elharo at metalab.unc.edu
Fri Apr 12 19:39:51 PDT 2002

At 2:50 PM -0700 4/12/02, Noam Tamim wrote:

>Now that you mention it, there's another place in the API where bitmasking is
>used: Reflection. Just look at the java.lang.reflect.Modifier class.

Really? Yuck. I just looked at it and that strikes me as poor design 
for pretty much the same reasons I don't like it in JDOM.

For the record, here's one more: sooner or later someone is going to 
come along and start passing real ints to it rather than named 
constants and cause all sorts of havoc, possibly with their own code, 
possibly with somebody else's. I just don't see why we need to expose 
this complexity when the OO solution is so much cleaner.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |

More information about the jdom-interest mailing list