6

I was playing around with annotation processing and was unable to use generated files directly via an import in my code. Instead I had to prepend the generated class with its complete package. I posted a SO question error: package generated.schema does not exist.

In the end I figured out the reason for this, turned out to be pretty simple, see my answer to the same post. Turned out the error was because I was generating the files at last round of processing, instead of anywhere in between.

So my questions are:

  • How does generating files at last round vs generating files at in between rounds changes accessing the generated files in code?

  • Is there a specific reason (Java-related or otherwise) for this behavior?

2
  • Does you generate source code contain annotation which needs another APT?
    – El Hoss
    Jul 25, 2019 at 7:24
  • @ElHoss No.....
    – Abbas
    Jul 25, 2019 at 14:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.