---
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 ";
--
1.9.3