简体   繁体   中英

Deleting superclass methods and removing all overriding methods

I initially created an abstract method in a superclass that is overridden in all subclasses. Now, I no longer want that method to be abstract, and I don't want the subclasses to override it. Is there an easy way to delete the method declaration in the superclass and tell it to delete all overriding methods? The only quick fixes I saw when I tried this were to recreate the method or remove the @Override annotation, neither of which I want to do.

Any ideas?

When you delete it then so long as you had the @override annotation you will immediately get errors reported everywhere it's over-ridden.

It's simple enough to go to each error report and delete it manually.

(This is part of the reason @override was added).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM