How to create PsiClass for Record from 14 jdk ?

已回答

I trying to make plugin for static code analysis by JetBrains api , by inspections.

Tell me please how to create PsiClass for Record from 14 jdk ? 

Documentation tells use PsiFileFactory , but :

Firstly - it is abstract class , what implementation do I need? 

Secondly , how to create exactly record from 14 jdk ? 

0

com.intellij.psi.PsiElementFactory#createRecord

com.intellij.psi.PsiJavaParserFacade#createRecordHeaderFromText

You must obtain instance of PsiElementFactory via com.intellij.psi.PsiElementFactory#getInstance

0

And how to create record with parameters ? 

0

The returned PsiClass from PsiElementFactory can be modified afterwards programmatically.

0

请先登录再写评论。