How to get PsiField's docComment
Answered
Hi,
I want to get a PsiJavaFile's fields doccoment, but psiField.getDocComment() return null?
Because of the source file is .class file?
It seems that PsiClassImpl can getDocComent, but It return ClsClassImpl when I call PsiClass.getFields()
Thanks
Please sign in to leave a comment.
Hi,
Please clarify your use case.
What is the exact code you are trying, and what are the files/classes you execute it on?
I want to read a Java File's methods, get the method parameters-type and return-type, get the fields-type of the parameter, get the docComment of the fields. but the docComment is null.
This is my code:
According to the information from Slack, it was called on the code like:
And the comment is not a JavaDoc, and that's why getDocComment() returned null.