[Pkg-libvirt-commits] [libguestfs] 253/384: java: add @Deprecated annotation for deprecated methods
Hilko Bengen
bengen at moszumanska.debian.org
Sun Mar 29 16:57:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 85b6b5e589bea56046b85a5b0143a364e20dacd1
Author: Pino Toscano <ptoscano at redhat.com>
Date: Tue Feb 10 15:10:34 2015 +0100
java: add @Deprecated annotation for deprecated methods
---
generator/java.ml | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/generator/java.ml b/generator/java.ml
index 8b0d12f..81faff1 100644
--- a/generator/java.ml
+++ b/generator/java.ml
@@ -280,7 +280,11 @@ public class GuestFS {
pr " */\n";
);
pr " ";
- generate_java_prototype ~public:true ~semicolon:false f.name f.style;
+ let deprecated =
+ match f with
+ | { deprecated_by = None } -> false
+ | { deprecated_by = Some _ } -> true in
+ generate_java_prototype ~public:true ~semicolon:false ~deprecated f.name f.style;
pr "\n";
pr " {\n";
pr " if (g == 0)\n";
@@ -421,7 +425,8 @@ and generate_java_call_args ~handle (_, args, optargs) =
pr ")"
and generate_java_prototype ?(public=false) ?(privat=false) ?(native=false)
- ?(semicolon=true) name (ret, args, optargs) =
+ ?(semicolon=true) ?(deprecated=false) name (ret, args, optargs) =
+ if deprecated then pr "@Deprecated ";
if privat then pr "private ";
if public then pr "public ";
if native then pr "native ";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list