Michael Nascimento Santos discusses the changes made to the Reflection API in J2SE 1.5 (Tiger). Michael walks through the various changes in the API to do with JSR-175 metadata, working with Generics, and changes to the "Old" API.
Summary
"Much has been written about the new language features in J2SE 1.5, Tiger. Many, such as the introduction of enums, generics, and metadata, involve changing bytecode. These additions to the language require modifications to existing APIs. One of the APIs most radically affected by these changes is the Reflection API. Reflection has existed since JDK 1.1, and many frameworks, libraries, and utilities have been built upon it. This article examines the modifications to the Reflection API that are now available to the public as part of JDK 1.5 beta 1, and shows how you can take advantage of them in your code."
Read Reflection on Tiger
-
Reflection on Tiger: Changes in the Reflection API in JDK 1.5 (3 messages)
- Posted by: Dion Almaer
- Posted on: March 08 2004 16:50 EST
Threaded Messages (3)
- Reflection on Tiger: Changes in the Reflection API in JDK 1.5 by Vladimir Goncharov on March 08 2004 20:39 EST
- Reflection on Tiger: Changes in the Reflection API in JDK 1.5 by Mileta Cekovic on March 09 2004 04:36 EST
- Reflection on Tiger: Changes in the Reflection API in JDK 1.5 by Kevin Citron on March 09 2004 20:33 EST
-
Reflection on Tiger: Changes in the Reflection API in JDK 1.5[ Go to top ]
- Posted by: Vladimir Goncharov
- Posted on: March 08 2004 20:39 EST
- in response to Dion Almaer
It is a good article but the jsr175 spec should be read first http://jcp.org/aboutJava/communityprocess/review/jsr175/index.html, honestly Ive never seen anything more complicated then this metadata, it includes interface, inheritance and some weird syntax that is even hard to read. BTW, is this necessary to deploy the Annotation interface and Impl when shipping the application?
Any way it might be useful for IDE and other tools such as Rational for example but it is hard to accept as substitution for XDoclet because of its complexity. May be some additional homework needs to be done, but Im depressed in a meantime. -
Reflection on Tiger: Changes in the Reflection API in JDK 1.5[ Go to top ]
- Posted by: Mileta Cekovic
- Posted on: March 09 2004 04:36 EST
- in response to Vladimir Goncharov
Ive never seen anything more complicated then this metadata
I don't find it complicated at all. It is prety simple, if you read the spec. Syntax is somewhat strange, but believe me, if someone is introduced to Java without C/C++ background he/she will find Java syntax strange at the first sight (with all these { } && || ).
The only problem with JSR 175 is that annotation definition must be present at compile and execution time.
Mileta -
Reflection on Tiger: Changes in the Reflection API in JDK 1.5[ Go to top ]
- Posted by: Kevin Citron
- Posted on: March 09 2004 20:33 EST
- in response to Dion Almaer
Depressed is an understatement. I think the developers of this
new "metadata" hybrid API. Is just plain ugly and overly complex.
You can call them "Annotations" I call them cumbersom and awkward.
Unfortunately, what we are seeing is C++ creep into the core of the
language semantics.