Is it possible to create an interface which requir...
# serialization
r
Is it possible to create an interface which requires one of its properties to be
@Serializable
? Or
@Contextual
? Ideally it would be a compile-time exception if the contract wasn't followed, but not the end of the world if its a runtime problem.
d
You could ask for a serialiser in the interface I guess.
e
Do you want the any of the interface realisation to be serialisable also?
Probably not, otherwise it will be just for free
r
Right, no on the interface implementation itself
p
Sounds like you want to write a lint rule for that