Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(759)

Unified Diff: mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl

Issue 291903003: Generate java bindings for constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl b/mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl
new file mode 100644
index 0000000000000000000000000000000000000000..381b61615a712b8524f36e36c2ef65e930c37f52
--- /dev/null
+++ b/mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl
@@ -0,0 +1,8 @@
+{% from "java_macros.tmpl" import set_default %}
+
+{% macro constant_def(constant) %}
+public static final {{constant.kind|java_type}} {{constant|constant_name}};
+static {
+ {{set_default(constant|constant_name, module, constant.kind, constant.value, 0)|indent(4)}}
+}
+{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698