How to flag a class as under development in Java

Posted by Usavich on Programmers See other posts from Programmers or by Usavich
Published on 2011-08-10T16:23:05Z Indexed on 2012/06/09 22:46 UTC
Read the original article Hit count: 214

Filed under:

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 class3 as 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?

© Programmers or respective owner

Related posts about java