Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Annotation Processing sometimes misses annotated class
Annotation Processing sometimes misses annotated class [message #900419] Tue, 07 August 2012 00:53
Eclipse UserFriend
We have a project that effectively produces a set of text files based on
annotated class. All in all we have 22 annotated classes out of
thousands and sometimes eclipse will find all the annotated classes.
The problem is that sometimes it won't. All the class are properly
compiled, just from debugging into the following method we see that the
RoundEnvironment rarely through multiple rounds will it return all 22
classes. Instead we get a consistent 15 that are returned.

Any idea where to debug in eclipse to figure out why it can compile the
classes all the time but only sometimes return the annotated classes?

public boolean preProcess( final Set<? extends TypeElement>
annotations )
for( TypeElement annotation : annotations )
List<Tuple<Element, AnnotationMirror>> elements = new
Set<? extends Element> annotatedElements =
roundEnv.getElementsAnnotatedWith( annotation );
for( Element element : annotatedElements)
for( AnnotationMirror annotationMirror :
element.getAnnotationMirrors() )

.toString() ) )
elements.add( new Tuple<>( element,
annotationMirror ) );

if( elements.size() > 0 )
roundMap.put( annotation, elements );

return ensureAllSupportedAnnotations();

Previous Topic:How send Email in JSP page by java?
Next Topic:Eclipse plugin for GUI design with JQuery UI Components
Goto Forum:

Current Time: Sun Oct 22 12:18:50 GMT 2017

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

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