ONJava.com    
 Published on ONJava.com (http://www.onjava.com/)
 See this if you're having trouble printing code examples


Advanced Annotations and Aspects

by Chris Adamson
ONJava Newsletter for 10/21/2004

Greetings...

This week's ONJava continues with advanced forays into the realms of attributes and aspect-oriented programming. These are fundamentally new ways to think about programming, and by running multiple articles on both, we hope to get beyond the typical "hello world" kind of introductory material to topics where you can really achieve something new.

Russ Miles continues his series on AOP and Spring, which started off with what he calls "the hello worlds of aspect-orientation: tracing and logging." In An Introduction to Aspect-Oriented Programming with the Spring Framework, Part 2, Russ shows "how 'around' advice can be used to intercept and change the way that features within your applications are interacted with, in order to implement the Cuckoo's Egg aspect-oriented design pattern."

Eugene Kuleshov has returned to cover the ASM Bytecode Toolkit, applying it to the metadata feature introduced in J2SE 5.0. In Create and Read J2SE 5.0 Annotations with the ASM Bytecode Toolkit, he shows how annotations are represented in Java bytecode and how the ASM bytecode-manipulation toolkit can work with them, even in pre-5.0 JVMs, noting that the article's code "allows you to read annotation data that is not available through the Java 5 reflection API."

Threading is much improved in J2SE 5.0, with the old wait() and notify() augmented by a whole new package of tools for coordinating threads. In Advanced Synchronization in Java Threads, Part 1, an excerpt from Java Threads, 3rd Edition, Scott Oaks and Henry Wong introduce the Semaphore, Barrier, Countdown Latch, Exchanger, and ReaderWriterLock classes introduced by the new java.util.concurrent package.

To subscribe to the ONJava.com newsletter (or any O'Reilly Network newsletters), visit https://epoch.oreilly.com/account/default.orm and select the newsletters you wish to receive in your user profile (you'll need to log in with your existing O'Reilly Network account -- if you don't yet have an account, you'll need to create one).

To change your newsletter subscription options, please visit https://epoch.oreilly.com/account/default.orm and click the"Manage My Newsletters" link. For assistance, send help to

In this week's feature article from java.net, The Blacksmith and the Bookkeeper, Part 3, Max Goff concludes his look at the future of the programming profession. Considering that today's Java coder hardly resembles his or her 1960's counterpart, a plausible progression of events shows less need for custom application development, especially when purchasing off-the-shelf components or even letting computers write their own code (through artificial intelligence, genetic algorithms and the like) is better and cheaper. The future programmer may have to focus on those traits that are difficult to automate, meaning that, as Goff puts it, "today's coder will evolve into something more like a concierge than an expert system."

Please join us again next week.

Chris Adamson, editor
ONJava.com

Chris Adamson is an author, editor, and developer specializing in iPhone and Mac.


Return to ONJava.com.

Copyright © 2009 O'Reilly Media, Inc.