hi folks, is there any simpler way to retrieve imp...
# ksp
m
hi folks, is there any simpler way to retrieve imports from
KSClassDeclaration
? currently can’t find any better way other than creating a new file from the provided
KSFile::filePath
then read each lines and mark it as an import statement if it starts with
import
.
e
Thats the only way. What are you trying to achieve? Or why do you want to read import statements
m
I want to retrieve imports from given
KSClassDeclaration
and see if its contain any wildcard
*
import since need to do some workaround when dealing it with kotlinpoet
e
Doesnt really answer the question of what you are trying to do. Also raises more questions, you should not care if there is a wild card import or not. KSP would give you the exact symbol so why would you need to know if user used a wildcard to import that symbol?
j
import statement is not supported, your best option is as you mentioned to read the files.
👍 1
👍🏾 1