I had a discussion with a coworker today, whether usage of using the Java operator instanceof is a kind of reflection. And the discussion quickly evolved into what actually defines reflection.
So, what is the definition of reflection?
And is the usage of instanceof considered "using reflection" ?
And in addition, if instanceof is considered reflection, then is polymorphism not also "using reflection"? If not, what is the difference?

instanceofis an example of reflection. Certainly it is somewhere between normal data use and metadata use viagetClass()& friends, but you can have workable definitions wither way. – Kilian Foth Sep 7 '11 at 7:26returnconsidered "structural programming"? – SF. Sep 7 '11 at 9:13