Re: Reflection, how to understand
- From: "John_Woo" <john_woo@xxxxxxxxxx>
- Date: 31 Aug 2006 11:42:31 -0700
Oliver Wong wrote:
"John_Woo" <john_woo@xxxxxxxxxx> wrote in message
news:1157044317.744253.105310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I'm trying understand jdk 5 reflection.
I know it's for loading/invoking method on the fly. I'm wondering, any
simple core-java example (not sort of EJB, rmi) illuestrated how an app
re-compile then invoke the newly classes/methods, and why need to do
that (recompile)?
Reflection isn't nescessarily related to recompilations. I think the
name "reflection" is supposed to convey the image of a Java program looking
at itself in a mirror, or in other words, to look at itself.
For example, you might have an object which is an instance of Class. You
can query this object to find out what methods it has, and invoke these
methods. This would be using reflection, even if no (re)compilation was
involved.
Thanks, Oliver.
if I want to see how a class recompiled and its method updated then
invoked, do you have an example, and what cases need a class to be
compiled in running time?
John
.
- Follow-Ups:
- Re: Reflection, how to understand
- From: Oliver Wong
- Re: Reflection, how to understand
- References:
- Reflection, how to understand
- From: John_Woo
- Re: Reflection, how to understand
- From: Oliver Wong
- Reflection, how to understand
- Prev by Date: Re: jview vs java.exe (speed)
- Next by Date: Subversion GUI, maybe in java
- Previous by thread: Re: Reflection, how to understand
- Next by thread: Re: Reflection, how to understand
- Index(es):
Relevant Pages
|