?

Log in

No account? Create an account

Previous Entry | Next Entry

I'm currently reading the novelisation of The Phantom Menace. Amazingly, Jar-Jar Binks is just as annoying in writing as he was in the film. I think I ought to be impressed.

Today I have also discovered Java reflection. Sweet.

Comments

( 2 comments — Leave a comment )
rozallin
Apr. 27th, 2004 11:05 am (UTC)
What's Java reflection? (And I should probably know this...)
araqnid
Apr. 27th, 2004 11:53 am (UTC)
It's the user-level interface to the classloader-- you can get a class object from a class name (which loads the class into the JVM), and then the reflection interface (java.lang.reflect.*) allows you to probe what constructors/methods it has, and invoke them; all without the class meing available at compile time.

Since I've tended to make fairly heavy use of something like this in Perl, I was a bit wary of not being able to do it in Java. But actually you can, and it's well-developed to still satisfy Java's type-safety system, which is quite impressive. Once you get your head around Class objects, though. Which I didn't know about until a few days ago. Talk about learning on the job...
( 2 comments — Leave a comment )

Profile

araqnid
Steve Haslam

Latest Month

March 2009
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Page Summary

Powered by LiveJournal.com
Designed by Tiffany Chow