-
Context: Given i have an apex class implementing The question i have is are the implemented interfaces available for a custom XPath rule? I could find it however in the Java code: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
No, getters returning lists are not exposed as attributes in xpath… I think you have a legit use case here, but right now I believe it's only feasible with rules written in Java… |
Beta Was this translation helpful? Give feedback.
-
For completeness, I've just submitted a PR for PMD 7.1.0 that would expose collection attributes such as With that you should be able to write //UserClass[
not(empty(index-of(@InterfaceNames, 'Queueable'))). (: implements Queueable :)
and empty(index-of(@InterfaceNames, 'Finalizer')) (: but doesn't implement Finalizer :)
] |
Beta Was this translation helpful? Give feedback.
For completeness, I've just submitted a PR for PMD 7.1.0 that would expose collection attributes such as
getInterfaceNames()
as an XPath attribute through a sequence. #4969With that you should be able to write