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

Unified Diff: trunk/src/mojo/public/tools/bindings/generators/java_templates/struct_definition.tmpl

Issue 354833003: Revert 279677 "Generate java bindings for structs." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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: trunk/src/mojo/public/tools/bindings/generators/java_templates/struct_definition.tmpl
===================================================================
--- trunk/src/mojo/public/tools/bindings/generators/java_templates/struct_definition.tmpl (revision 279687)
+++ trunk/src/mojo/public/tools/bindings/generators/java_templates/struct_definition.tmpl (working copy)
@@ -1,32 +0,0 @@
-{% from "constant_definition.tmpl" import constant_def %}
-{% from "enum_definition.tmpl" import enum_def %}
-
-{% macro struct_def(struct, inner_class=False) %}
-{{'static' if inner_class else 'public'}} final class {{struct|name}} extends org.chromium.mojo.bindings.Struct {
-{% for constant in struct.constants %}
-
- {{constant_def(constant)|indent(4)}}
-{% endfor %}
-{% for enum in struct.enums %}
-
- {{enum_def(enum, false)|indent(4)}}
-{% endfor %}
-{% if struct.fields %}
-
-{% for field in struct.fields %}
- public {{field.kind|java_type}} {{field|name}};
-{% endfor %}
-{% endif %}
-
- public {{struct|name}}() {
-{% for field in struct.fields %}
-{% if field.default %}
- {{field|name}} = {{field|default_value}};
-{% elif field.kind|is_handle %}
- {{field|name}} = org.chromium.mojo.system.InvalidHandle.INSTANCE;
-{% endif %}
-{% endfor %}
- }
-
-}
-{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698