Let\'s say I have:
class A {
Integer b;
void c() {}
}
Why does Java have this syntax: A.class
, and doesn\'t have a syntax
I take it you want this info for logging and such. It is most unfortunate that such information is not available although the compiler has full access to such information.
One with a little creativity you can get the information using reflection. I can't provide any examples for asthere are little requirements to follow and I'm not in the mood to completely waste my time :)