From f23e35792b66f0db00788251a2af76f728f53724 Mon Sep 17 00:00:00 2001 From: Julian Kast Date: Fri, 9 Oct 2020 15:48:41 -0400 Subject: Updated Function and Struct Template For the RPC Generator to make setters chainable --- generator/templates/function_template.java | 2 +- generator/templates/struct_template.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'generator') diff --git a/generator/templates/function_template.java b/generator/templates/function_template.java index 1d95cdc40..4372114d4 100644 --- a/generator/templates/function_template.java +++ b/generator/templates/function_template.java @@ -31,7 +31,7 @@ {%- if p.deprecated is defined and p.deprecated is not none %} @Deprecated {%- endif %} - public void set{{p.title}}({% if p.mandatory %}@NonNull {% endif %}{{p.return_type}} {{p.last}}) { + public {{class_name}} set{{p.title}}({% if p.mandatory %}@NonNull {% endif %}{{p.return_type}} {{p.last}}) { setParameters({{p.key}}, {{p.last}}); } diff --git a/generator/templates/struct_template.java b/generator/templates/struct_template.java index aea04d9e7..f8424934e 100644 --- a/generator/templates/struct_template.java +++ b/generator/templates/struct_template.java @@ -27,7 +27,7 @@ {%- if p.deprecated is defined and p.deprecated is not none %} @Deprecated {%- endif %} - public void set{{p.title}}({% if p.mandatory %}@NonNull {% endif %}{{p.return_type}} {{p.last}}) { + public {{class_name}} set{{p.title}}({% if p.mandatory %}@NonNull {% endif %}{{p.return_type}} {{p.last}}) { setValue({{p.key}}, {{p.last}}); } -- cgit v1.2.1