visitor method to override to determine if a type implements an interface? I looked at visitSuperTypeEntry but in poking it I didn't see what i was looking for. Usecase: if a type implements an interface, check the value set to a
val
property.
b
Brais Gabin
02/15/2022, 4:53 PM
I imagine that you need to start looking at
visitClass
(or something like that) And check if it implements your interface. If it does you add it to a list. Then you check the properties and check if it does what you want and at the end of
visitFile
you can if it's correct.
Brais Gabin
02/15/2022, 4:56 PM
Other option is to check all the properties, check if it is the property that you want and check that its class implements that interface.
j
Justin Tullgren
02/15/2022, 5:52 PM
Thanks for replying! I looked at visitClass. I am not sure how to resolve the super types ? Is there some sort of resolution i need to do on the provided input?