java: simplify backend init
diff --git a/java_gen/codegen.py b/java_gen/codegen.py
index 6c589c9..f349f9e 100644
--- a/java_gen/codegen.py
+++ b/java_gen/codegen.py
@@ -44,9 +44,7 @@
import java_gen.java_model as java_model
-def gen_all_java(out, name):
- # close the virtual file - we don't need it
- out.close()
+def gen_all_java():
basedir= '%s/openflowj' % of_g.options.install_dir
print "Outputting to %s" % basedir
if os.path.exists(basedir):
diff --git a/lang_java.py b/lang_java.py
index 7b992d7..3891076 100644
--- a/lang_java.py
+++ b/lang_java.py
@@ -27,31 +27,9 @@
"""
@brief Java language specific LOXI generating configuration
-
-This language specific file defines:
-
-target_files: List of internal references to files to generate
-file_gen_map: The map from above file references to generator functions
-file_to_name_map: The map from internal references to external file names
-file_to_subdir_map: The map from internal references to external subdirectories
-
-HOWEVER, since java files are all a function of their class name, we don't
-know in advance what the names of the files/classes will be, so we just
-define a single directory and generate everything in there.
- @fixme talk to DanT to see if there isn't something that makes more sense
-
"""
-import os
-import loxi_utils.loxi_utils as loxi_utils
import java_gen.codegen as java_codegen
-
-targets = {
- 'openflowj/README': java_codegen.gen_all_java
-}
-
def generate():
- for (name, fn) in targets.items():
- with loxi_utils.open_output(name) as outfile:
- fn(outfile, os.path.basename(name))
+ java_codegen.gen_all_java()