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.
请先登录再写评论。
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.