Is it possible to get an object that invoked static method in this method?
I have this code:
class A{ static void foo(){ } } A a = new A(); a.foo
No; that's what static means. The compiler actually completely ignores the instance.
static
Use an instance method.