I'm working on a internship project, but I have to leave before I can finish up everything.
I have 1 class that is not stable enough for production use. I want to mark/flag this class so that other people will not accidentally use it in production. I have already put the notice in Javadoc, but that doesn't seem enough. Some compiler error or warning would be better.
The code is organized like this:
[Package] | company.foo.bar.myproject |-- Class1.java |-- Class2.java |-- Class3.java <--(not stable)
If there was a single factory class that calls those classes in public methods, I could have set the method to
private. However the API is NOT exposed that way. Users will directly use those class, e.g.
new Class1();, but I can't make a top-level class private. What's the best practice to deal with this situation?