-
Is your feature request related to a problem? Please describe. Describe the solution you'd like Describe alternatives you've considered Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If that does not answer your question, please add more details about how and from where you want to get that information |
Beta Was this translation helpful? Give feedback.
-
@oowekyala got it! Thanks! |
Beta Was this translation helpful? Give feedback.
ASTCompilationUnit
has a method getPackageName which you can also use in XPath with the attribute@PackageName
. To find the node in Java you have to get the root of the tree, by askinggetParent
until you find it. We have added a methodgetRoot
to every Node in PMD 7 which we could backport to make that easier.If that does not answer your question, please add more details about how and from where you want to get that information