Skip to content

Commit

Permalink
#257 - Make generated classes final
Browse files Browse the repository at this point in the history
  • Loading branch information
rbygrave committed Jan 11, 2023
1 parent d66451c commit 13c24f1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private void writeClassEnd() {
private void writeClassStart() {
writer.append(Constants.AT_PROXY).eol();
writer.append(Constants.AT_GENERATED).eol();
writer.append("public class %s%s extends %s {", shortName, suffix, shortName).eol().eol();
writer.append("public final class %s%s extends %s {", shortName, suffix, shortName).eol().eol();
}

private Writer createFileWriter() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private void writeClassStart() {
if (beanReader.getBeanType().getNestingKind().isNested()) {
shortName = shortName.replace(".", "$");
}
writer.append("public class ").append(shortName).append(suffix).append(" ");
writer.append("public final class ").append(shortName).append(suffix).append(" ");
if (beanReader.isRequestScopedController()) {
writer.append("implements ");
beanReader.factoryInterface(writer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private void writeStartClass() {
scopeInfo.buildAtInjectModule(writer);

String interfaceType = scopeInfo.type().type();
writer.append("public class %s implements %s {", shortName, interfaceType).eol().eol();
writer.append("public final class %s implements %s {", shortName, interfaceType).eol().eol();
scopeInfo.buildFields(writer);
if (scopeInfo.addModuleConstructor()) {
writeConstructor();
Expand Down

0 comments on commit 13c24f1

Please sign in to comment.