How to create PsiAnnotationMethod
I see that I can use PsiDirectory.createAnnotationType() to create a new annotation type. However, I don't see any methods in PsiClass or PsiElementFactory for creating an annotation method. Is there something in the API for creating such? Thanks.
Please sign in to leave a comment.
FYI. I ended up using PsiElementFactory.createFileFromText() to create the annotation type and method(s).
However, is there another way?
No, we didn't consider this to be frequent enough task to provide any shortcut method.
OK. Thank you. You are probably correct.