What java annotation should I use to alert the class / method user that currently the class / method don't preform there declared intent? (When used as a placeholder) @deprecated
is not quite right because it suggests there is some other method to replace the current one while there is no such method.
Asked
Active
Viewed 133 times
0

avivgood2
- 227
- 3
- 19
-
"it suggests there is some other method to replace the current one" not really. "Deprecated" only means "it will be removed in the future", nothing more. – Federico klez Culloca Aug 24 '20 at 14:29
-
@FedericoklezCulloca ok, but it is still not suitable since the method will not necessarily be removed in the future – avivgood2 Aug 24 '20 at 14:30
-
Anyway, what's your goal? Just document the class as not being usable (or don't document it at all as a public interface) – Federico klez Culloca Aug 24 '20 at 14:31
-
@FedericoklezCulloca I can't just not document it. First because it will be suggested to the user by the IDE and when he will check the docs and won't find the method he would be confused. and second because it is okay for the user to use the function I just want him to beware that it is currently return meaningless value / don't preform the action it supposed to. As for the second suggestion it won't be as effective because it can't be run timed checked / checked and warned by the compiler – avivgood2 Aug 24 '20 at 14:37
-
1So just **document that**, i.e. write it in the javadoc, e.g. *"This method throws `UnsupportedOperationException` until I can get time to actually implement it"*, or something to that effect. – Andreas Aug 24 '20 at 15:38
-
21) It doesn't matter what annotation you come up with, the IDE won't be implementing it so it's moot. The user will still get the suggestion. 2) Add Javadoc comments to your code. The user will see these and can choose to use . There are other annotations you can use to point the user to a preferred method. – Ryan Aug 24 '20 at 15:38