In software development, we all use libraries by software vendors. Consider four functions in class A: x, y, g. I just want my development team not to use the x function. Therefore, instead of telling them not to use, I found an idea. Inherit the class and override all functions, and unsupportedmethod exception is thrown for function x, and for the rest I call super methods. There I also found a problem, developers can directly use the base class A, how to avoid the direct use of class A. I found similar functionality in OSGi, lib packages can be introduced and then not exported, and so on. Is there any way to achieve this - java?
source
share