Skip to main content

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:Installing Eclipse for Java
Next Topic:Source code from folder in "subst" unit, not found
Goto Forum:

Current Time: Tue May 22 00:43:10 GMT 2018

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

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

Back to the top