Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.7
-
None
Description
I have an abstract class that represents a base Command (with a generic type for one argument), and the implementing classes ought to be immutable. I can't use @Immutable on the base class because it implicitly adds final, and I can't use it on the concrete classes because then I get a constructor that takes the class's immediate fields but nothing for the superclass's.
I'm not sure exactly what semantics would be correct in dealing with an immutable subclass of an abstract class, but it would be useful to be able to use @Immutable on the concrete type and get a constructor that accepted values for the superclass properties as well as the immediate ones. Perhaps also permit @Immutable on abstract classes, with the usual semantics but not adding final?