Skip to content
Permalink
Browse files

[COLAB-2918]: generate additional getters for Boolean fields in clien…

…t side POJOs
  • Loading branch information...
nkraler committed Jan 31, 2019
1 parent 7878322 commit 28ed577ba7d316bed3161e2185a67a1cc945277f
@@ -288,6 +288,16 @@ private static void createGettersAndSetters(JavaClassSource pojo,
.setName(getterPrefix + capitalizedName)
.setBody(bodyGetter)
.addAnnotation(Override.class);


if (field.getType().isType(Boolean.class)) {
pojo.addMethod()
.setPublic()
.setReturnType(field.getType())
.setName("get" + capitalizedName)
.setBody(String.format("return this.is%s();", capitalizedName))
.addAnnotation(Deprecated.class);
}
}
}

0 comments on commit 28ed577

Please sign in to comment.
You can’t perform that action at this time.