I am using NETBeans IDE for developing an annotation processor. I have written the annotation processor and then convert it to a JAR and then add this JAR as a referenced library to another java application where i am using the annotations.
Now my question is inside the annotation processor if i want to access the source files( the ones which are annotated) then i try to get a FileObject using the below code
FileObject source = processingEnv.getFiler().getResource(StandardLocation.SOURCE_PATH,"","demo/MainCopy.java");
but its returning null. Here demo is the package which has the annotated class MainCopy.java . When i read the documentation of StandardLocation class it says for it to work it must be supported , Could somebody help me solve this or guide me as to how to obtain the FileObject.
Thanks