summaryrefslogtreecommitdiff
path: root/generator
diff options
context:
space:
mode:
authorJulian Kast <julian@livio.com>2020-10-09 15:48:41 -0400
committerJulian Kast <julian@livio.com>2020-10-09 15:48:41 -0400
commitf23e35792b66f0db00788251a2af76f728f53724 (patch)
tree0c11cee767e9ed817e5fb933b60b46bd756d8403 /generator
parent13046fee03d5cf656d2bd39b93f7fac4dea04a88 (diff)
downloadsdl_android-f23e35792b66f0db00788251a2af76f728f53724.tar.gz
Updated Function and Struct Template For the RPC Generator to make setters chainable
Diffstat (limited to 'generator')
-rw-r--r--generator/templates/function_template.java2
-rw-r--r--generator/templates/struct_template.java2
2 files changed, 2 insertions, 2 deletions
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}});
}