I have a class in which all the members are static. Within these static members I want to get a handle to the Class. What is the best way to do that?

Now, I know I could construct an instance of the class, and then say getClass() on that instance, but that seems unnecessarily roundabout. And I suppose I could say Class.forName("MyClassName") but that is a little short of elegant, and if later I change MyClassName using Eclipse's neat renaming power, Eclipse won't change the string parameter "MyClassName" and I will be plagued with more work to do.

So I want the neat and elegant way to learn the name of the containing class from within a static method. It there such?

Thank you,
Rich


_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to