I have some third party library Foo with class FooBar. I think that class FooBar is badly designed. I want to write my own MyBar as adapter pattern. Can I mark the original FooBar as @Deprecated
without modifying its code?
@deprecated
should be added to the source to flag the class/method as deprecated. So you cannot deprecate someone else's code.
However if you have a better alternative that you prefer to use in your project as a standard, then you can impose this standard in other ways, as a rule in checkstyle for instance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With