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.

3 comments
Comment actions Permalink

FYI. I ended up using PsiElementFactory.createFileFromText() to create the annotation type and method(s).

However, is there another way?

0
Comment actions Permalink

No, we didn't consider this to be frequent enough task to provide any shortcut method.

0
Comment actions Permalink

OK. Thank you. You are probably correct.

0

Please sign in to leave a comment.