C
Chris Berg
In a non-static method one can do:
Class clazz=getClass();
Is something similar possible in a static method? One possibility is
Class clazz = Class.forName("mypackage.MyClass");
But it implies that I know the class name. Of course i know that, but
if I ever change the class name, or move it to another package, then I
propably forget to update this statement. Any other suggestions?
Chris
Class clazz=getClass();
Is something similar possible in a static method? One possibility is
Class clazz = Class.forName("mypackage.MyClass");
But it implies that I know the class name. Of course i know that, but
if I ever change the class name, or move it to another package, then I
propably forget to update this statement. Any other suggestions?
Chris