summaryrefslogtreecommitdiffstats
path: root/vpp-api/java/jvpp/gen/jvpp_impl_gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-api/java/jvpp/gen/jvpp_impl_gen.py')
-rw-r--r--vpp-api/java/jvpp/gen/jvpp_impl_gen.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/vpp-api/java/jvpp/gen/jvpp_impl_gen.py b/vpp-api/java/jvpp/gen/jvpp_impl_gen.py
index 5446a694c1b..08ebddfcf97 100644
--- a/vpp-api/java/jvpp/gen/jvpp_impl_gen.py
+++ b/vpp-api/java/jvpp/gen/jvpp_impl_gen.py
@@ -19,6 +19,12 @@ from string import Template
jvpp_ifc_template = Template("""
package $base_package;
+
+/**
+ * <p>Java representation of vpe.api.
+ * <br>It was generated by jvpp_impl_gen.py based on $inputfile
+ * <br>(python representation of vpe.api generated by vppapigen).
+ */
public interface JVpp extends java.lang.AutoCloseable {
/**
@@ -36,6 +42,11 @@ $methods
jvpp_impl_template = Template("""
package $base_package;
+/**
+ * <p>Default implementation of JVpp interface.
+ * <br>It was generated by jvpp_impl_gen.py based on $inputfile
+ * <br>(python representation of vpe.api generated by vppapigen).
+ */
public final class JVppImpl implements $base_package.JVpp {
private final $base_package.VppConnection connection;
@@ -82,7 +93,7 @@ no_arg_method_impl_template = Template(""" public final int $name() {
""")
-def generate_jvpp(func_list, base_package, dto_package):
+def generate_jvpp(func_list, base_package, dto_package, inputfile):
""" Generates JVpp interface and JNI implementation """
print "Generating JVpp"
@@ -126,14 +137,16 @@ def generate_jvpp(func_list, base_package, dto_package):
jvpp_file = open("JVpp.java", 'w')
jvpp_file.write(
- jvpp_ifc_template.substitute(methods="\n".join(methods),
+ jvpp_ifc_template.substitute(inputfile=inputfile,
+ methods="\n".join(methods),
base_package=base_package,
dto_package=dto_package))
jvpp_file.flush()
jvpp_file.close()
jvpp_file = open("JVppImpl.java", 'w')
- jvpp_file.write(jvpp_impl_template.substitute(methods="\n".join(methods_impl),
+ jvpp_file.write(jvpp_impl_template.substitute(inputfile=inputfile,
+ methods="\n".join(methods_impl),
base_package=base_package,
dto_package=dto_package))
jvpp_file.flush()