Skip to content

Generated $Route classes as final #524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private void writeRoutes(List<ControllerMethodWriter> methods) {
private void writeClassStart() {
writer.append(AT_GENERATED).eol();
writer.append(diAnnotation()).eol();
writer.append("public class %s$Route implements HttpFeature {", shortName).eol().eol();
writer.append("public final class %s$Route implements HttpFeature {", shortName).eol().eol();

var controllerName = "controller";
var controllerType = shortName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void writeClassStart() {
writer.append(AT_GENERATED).eol();
writer.append(diAnnotation()).eol();
writer
.append("public class ")
.append("public final class ")
.append(shortName)
.append(javalin6 ? "$Route extends AvajeJavalinPlugin {" : "$Route implements Plugin {")
.eol()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private void writeRouting(MethodReader method) {
private void writeClassStart() {
writer.append(AT_GENERATED).eol();
writer.append(diAnnotation()).eol();
writer.append("public class ").append(shortName).append("$Route implements Routing.HttpService {").eol().eol();
writer.append("public final class ").append(shortName).append("$Route implements Routing.HttpService {").eol().eol();

String controllerName = "controller";
String controllerType = shortName;
Expand Down