Women in Technology

Hear us Roar



Article:
  Peeking Inside the Box: Attribute-Oriented Programming with Java 1.5, Part 1
Subject:   APT
Date:   2004-07-19 10:58:13
From:   mbrowncpwr
I was just reading through the Java 5 in a nutshell article. And I noticed that it mentioned an Annotation Processing Tool that seems to provide preprocessing functionality for annotated classes. According to the Article APT will be included with J2SE 1.5 and provides:
a build-time, source-based, read-only view of program structure which cleanly models the Java programming language's type system. First, apt runs annotation processors that can produce new source code and other files.


Perhaps you can explore using APT's functionality in part two.

Full Threads Newest First

Showing messages 1 through 1 of 1.

  • Don Schwarz photo APT
    2004-07-29 18:47:06  Don Schwarz | [View]

    Yes, APT wasn't added until 1.5.0b2, which wasn't available until after I wrote this article. Part 2 has been published at:

    http://www.onjava.com/pub/a/onjava/2004/07/21/insidebox2.html

    and does not mention APT, unfortunately.

    APT appears to be very similar to the bytecode instrumentation framework that I wrote as part of this article, but focuses entirely on source code instrumentation. This is a topic that I just glossed over in the article because of a lack of tools to help simplify this. This is exactly what I was looking for at the time. I've also since discovered Apache Velocity, which is a tool for the creation of files from templates. It may also be worth investigating the use of Velocity if you want to do this type of programming but feel a bit uneasy about bytecode instrumentation.