This content has been marked as final. Show 2 replies
At least in the javac implementation of JSR 269, objects from a round are not valid after the round ends. Objects modeling changed types should be re-queried to get up to date information; this is admittedly an awkward correctness constraint. The issue is noted in Sun bug:
6191665 JSR 269 could throw IllegalStateException for use of declarations from prior rounds
Hm. Well, what I am finding then is that certain questions about the completeness of any particular type references could be supplied by the processor or type/element classes, because for my particular case, my problem is that I really need to only handle classes that have all their references resolved to known types and defer processing of incomplete classes to subsequent rounds where references have had a chance to be resolved. There's no handy query (that I know of) that answers that particular question. It also would be helpful if there where some mechanism in the processor to tell it to hand back a "refreshed" set of classes or methods one is interested in.
Now I am rather curious if it is required or just very useful to (seemingly) chuck out everything parsed in the previous round.