-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if CtPackage contains a package-info.java #2955
Comments
Even if it is not super clean, you can do the following: //Assuming that p is a CtPackage
((CtElementImpl) p).getPosition().toString().contains("package-info.java"); When there is no |
Actually you can check it from the compilation units:
|
I think |
May be we could add a something like |
Similar to |
Shouldn't |
That's exactly what I need. I want to know whether a package does not contain any CtType, package-info.java, and module-info.java (and other info files provided by future SDKs). I can't just check if the path of a package contains any *-info.java file because they might have been excluded from build, thus being not part of a model. |
Due to being a |
Ok I am sold on the |
I have implemented a PR ( #2957 ) containing WDYT? |
I'll close this issue as I think #2957 solves this. Don't hesitate to reopen if I missed something. |
Is there a method in CtPackage which allows me to check whether a package contains a
package-info.java
file?The text was updated successfully, but these errors were encountered: