Sealing is the only way to ask for exhaustibility testing. However, in separate files, you can define the attributes private-private, AGUT, BGuts, CGuts, etc., and then create sealed subclasses A, B, C, etc. in one file, as you did before, but mix these guts are defined elsewhere.
sealed abstract class Thing
class A extends Thing with AGuts
class B extends Thing with BGuts
...
source
share