Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Running annotations after other classes generated
Running annotations after other classes generated [message #652697] Sat, 05 February 2011 15:58
Alan Chaney is currently offline Alan Chaney
Messages: 20
Registered: January 2010
Junior Member
Hi

I've written a Java 6 annotation processor. It reads some of my annotations and generates new source files for classes by reading, and introspecting, existing classes. I believe that this is a typical annotation processing task.

The problem I have is that if I do a clean before a compile, some of the dependent classes don't exist, which is of course not surprising (as the annotation is being read during the source pass.) Is there any way that I can ask that the annotation processor is run *after* the other classes have been compiled? In effect, make the process multi-pass? I've fudged it at the moment by using an ant script which 'touches' the files I want to process, but that doesn't seem very elegant.

The only other way that I can see to do it is to add some kind of marker annotation to the output source, and then ask my annotation processor to build it all again.

Sorry if this has been answered before, but I can't find much on annotation processing on the site.

Thanks in advance

Alan



Previous Topic:Unable to set breakpoint in Ant script
Next Topic:Streamlining the Installation Process
Goto Forum:
  


Current Time: Wed Oct 01 16:17:09 GMT 2014

Powered by FUDForum. Page generated in 0.01513 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software