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?
I have some third party library Foo with class FooBar . I think that
Share
@deprecatedshould 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.