At 7:49 AM -0500 3/20/02, bob mcwhirter wrote:
>We could always take a page from JDBC. > >To 'register' your Navigator. > > Class.forName( "org.cheese.CheeseNavigator" ); > I've always hated this pattern in JDBC. It binds your code to a specific implementation class. However, it hides that fact from the compiler so there's no type checking and you don't find mistakes until runtime. And it's way too easy for code to fail when JAR files aren't in the right places. IMO, reflection is only appropriate when the name of the class to instantiate is *not* known at compile time. If it is known, then use a constructor. -- +-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | [EMAIL PROTECTED] | 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/ | +----------------------------------+---------------------------------+ _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest