I was jumping around inner classes. How can you know if an object is an instance of an inner class?
My first thought was looking for the $ character in the class name, as some commercial implementations do.
But I did a concept proof. I declared a class Po$tato and it worked, so no chance.
I the looked at the getDeclaringClass method of class Class, and I think I found the solution there.
So why am I posting this? Mainly to know if anyone had faced this before or if anyone knows about reserved characters on class names.
Cheers,
Dian
My first thought was looking for the $ character in the class name, as some commercial implementations do.
But I did a concept proof. I declared a class Po$tato and it worked, so no chance.
I the looked at the getDeclaringClass method of class Class, and I think I found the solution there.
So why am I posting this? Mainly to know if anyone had faced this before or if anyone knows about reserved characters on class names.
Cheers,
Dian