Support of @deprecated tag for java wrappers

asked 2016-10-06 14:08:06 -0500

jcrist gravatar image

is there any way to make a wrapper class or methods deprecated in java wrappers (support of @deprecated annotation)? It would be very convenient.

For example, feature2d wrappers like FeatureDetector and DescriptorExtractor seem to be redundant as the same functionality is now supported in opencv3.1 through children of Feature2D class. It would be good to annotate these classes as obsolete so that developers would be encouraged to use new more extensible and flexible API.

If the @deprecated annotation is not supported yet what would be the correct approach to introduce it to opencv 3.1?

edit retag flag offensive close merge delete



though (imho) you're right about the feature2d situation - the java wrappers are script-generated from c++ headers

berak gravatar imageberak ( 2016-10-06 15:00:19 -0500 )edit

so is there any notation in c++ we can use for deriving @deprecated annotation?

jcrist gravatar imagejcrist ( 2016-10-06 15:53:07 -0500 )edit

doxygen's \deprecated or @deprecated , maybe.

berak gravatar imageberak ( 2016-10-06 22:07:53 -0500 )edit

doxygen I think is a possible option but will it generate compilation warnings for c++ and python when a non-deprecated class or method is using a deprecated one? I googled a bit and found this article. Also some info here. For python there is something similar. Does it make sense to introduce these to opencv or doesn't it?

jcrist gravatar imagejcrist ( 2016-10-07 00:28:40 -0500 )edit

no, it won't generate compiler warnings.

have a look here , too .

berak gravatar imageberak ( 2016-10-07 00:51:24 -0500 )edit


(that's where all those doxygen tags end up)

berak gravatar imageberak ( 2016-10-09 06:57:20 -0500 )edit