This post originated from an RSS feed registered with Java Buzz
by Derek Kaczmarczyk.
Original Post: Hardcoded Class Names
Feed Title: S T R A Y neuron
Feed URL: http://www.strayneuron.com/mt/techindex.rdf
Feed Description: Java & Open Source musings by dkaz, a connoisseur of elegance through simplicity
Instead of hardcoding class names in your Java code (e.g. String clz = "com.foo.ReportFactory";), try generating it (e.g. String clz = ReportFactory.class.getName();) - it's a lot less brittle!...