Introducing backport175 - a backport of Java 5 annotations for Java 1.3/1.4
[ jonas ] 16:22, Tuesday, 15 February 2005
backport175 1.0 RC 1 has been released.

backport175 is backport of the Java 5 annotations (JSR-175) specification. Making strongly typed annotation available for Java 1.3/1.4 platforms. They are bytecode compatible with Java 5 annotations making them available for use by tools etc.

backport175 is Open Source and freely available under Apache License Version 2.0.

Modules

It has two separate modules:
  • Compiler - which compiles the backport175 annotations and puts them into the bytecode of the class (compatible with regular Java 5 RuntimeVisible annotations).
  • Reader - which allows you to read the backport175 annotations as well as regular Java 5 annotation through one single uniformed API. The reader also has an API for runtime management, which allows you to update the bytecode at runtime and have your changes propagated.

Plugins

It also comes with an Ant task and is fully integrated with an Eclipse plugin and an IntelliJ IDEA plugin.

Here is an example of the IDEA plugin in action:

Read more here...

Enjoy.
Comments

Hi guys,
Can/How do you define default values in your backported annotations?

--Emmanuel Bernard, February 15, 2005 05:41 PM

Hey.

Currently you can't. This is however something that would be fairly easy to add.
Do you have a need for that? If many people need it, we might consider adding it.

However, we handle default values when you are reading "real" Java 5 annotations using the Reader module.

/Jonas

--Jonas Boner, February 15, 2005 06:35 PM

Well, using annotations wo default values is most likely PITA, if they are designed in the same way as the J2EE 5.0 ones. Configuration by exception is the rule.

--Emmanuel Bernard, February 15, 2005 07:31 PM

Hi Guys,
within Tiger there is a tool called APT (Annotation Processing Tool) in order to analyse and react to annotations statically (not at runtime) by writing some AnnotationProcessors.
Is there a similar tool / possibility for backported annotations?

--Mario Gleichmann, March 21, 2005 03:14 PM
Post a comment









Remember personal info?