Original Post
Consider the following code :
public class MyClass
{
public void myFunction()
{
Class c=this.getClass();
// This will retrieve the class of the object on which the method in invoked
}
}
Now I would like to get the Class but from a static method :
public class MyClass
{
public static void myFunction()
{
Class c= ???
}
}
For now, I am just using :
Class c=MyClass.class;
But I am pretty sure there is another way, a bit more generic.
Herve