PROPOSAL: @OverrideAll annotation
Joseph D. Darcy
Joe.Darcy at Sun.COM
Thu May 14 22:22:57 PDT 2009
Gabriel Belingueres wrote:
> I've written a new feature that might be comfortable to use for
> someone. All input is welcomed.
> PROJECT COIN SMALL LANGUAGE CHANGE PROPOSAL FORM v1.0
> AUTHOR(S): Gabriel Belingueres
> Add an @OverrideAll annotation to allow a class to override all
> inherited methods with a trivial implementation. The resulting class
> then could be used as the basis for a Null Object pattern (or even a
> basic Mock object.)
> FEATURE SUMMARY:
> The proposed @OverrideAll annotation will allow the class to override
> all methods (from its superclasses and implemented interfaces) with a
> trivial body, but the defined class can choose to implement specific
> methods, replacing those that would be produced automatically by the
> MAJOR ADVANTAGE:
> Less coding for implementing Null Objects, or simple tests.
Catching up on commenting, this sounds like a fine job for an IDE and,
as you note, this capability already exists in some IDEs.
More information about the coin-dev