Skip to content

Commit a2cb03d

Browse files
committed
No functional change - tidy internal method names
1 parent 263e0dc commit a2cb03d

File tree

10 files changed

+2653
-2367
lines changed

10 files changed

+2653
-2367
lines changed

http-generator-core/src/main/java/io/avaje/http/generator/core/MethodReader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import io.avaje.http.api.Put;
2828
import io.avaje.http.generator.core.javadoc.Javadoc;
2929
import io.avaje.http.generator.core.openapi.MethodDocBuilder;
30-
import io.swagger.v3.oas.annotations.responses.ApiResponse;
3130
import io.swagger.v3.oas.annotations.tags.Tag;
3231
import io.swagger.v3.oas.annotations.tags.Tags;
3332

@@ -74,7 +73,7 @@ public class MethodReader {
7473
this.actualParams = (actualExecutable == null) ? null : actualExecutable.getParameterTypes();
7574
this.isVoid = element.getReturnType().getKind() == TypeKind.VOID;
7675
this.methodRoles = Util.findRoles(element);
77-
this.javadoc = Javadoc.parse(ctx.getDocComment(element));
76+
this.javadoc = Javadoc.parse(ctx.docComment(element));
7877
this.produces = produces(bean);
7978
this.apiResponses = getApiResponses();
8079
initWebMethodViaAnnotation();

http-generator-core/src/main/java/io/avaje/http/generator/core/PathSegments.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public class PathSegments {
1414
static final PathSegments EMPTY = new PathSegments(new Chunks(), Collections.emptySet());
1515

1616
static PathSegments parse(String fullPath) {
17-
1817
Set<Segment> segments = new LinkedHashSet<>();
1918

2019
Chunks chunks = new Chunks();
@@ -67,11 +66,8 @@ private static Segment createSegment(String val) {
6766
}
6867

6968
private final Chunks chunks;
70-
7169
private final Set<Segment> segments;
72-
7370
private final List<Segment> withMatrixs = new ArrayList<>();
74-
7571
private final Set<String> allNames = new HashSet<>();
7672

7773
private PathSegments(Chunks chunks, Set<Segment> segments) {
@@ -177,7 +173,6 @@ public static class Segment {
177173
* Create a literal path segment.
178174
*/
179175
public Segment(String section, boolean literalDummy) {
180-
181176
this.literalSection = section;
182177
this.name = null;
183178
this.sanitizedName = null;

http-generator-core/src/main/java/io/avaje/http/generator/core/ProcessingContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ProcessingContext(ProcessingEnvironment env, PlatformAdapter readAdapter)
4141
this.docContext = new DocContext(env, openApiAvailable);
4242
this.useComponent = isTypeAvailable(Constants.COMPONENT);
4343
this.diAnnotation = useComponent ? "@Component" : "@Singleton";
44-
44+
4545
final var javax = isTypeAvailable(Constants.SINGLETON_JAVAX);
4646
final var jakarta = isTypeAvailable(Constants.SINGLETON_JAKARTA);
4747
final var override = Boolean.getBoolean(env.getOptions().get("useJavax"));
@@ -93,7 +93,7 @@ public FileObject createMetaInfWriter(String target) throws IOException {
9393
return filer.createResource(StandardLocation.CLASS_OUTPUT, "", target);
9494
}
9595

96-
public String getDocComment(Element param) {
96+
public String docComment(Element param) {
9797
return elements.getDocComment(param);
9898
}
9999

@@ -113,7 +113,7 @@ public PlatformAdapter platform() {
113113
return readAdapter;
114114
}
115115

116-
public String getDIAnnotation() {
116+
public String diAnnotation() {
117117
return diAnnotation;
118118
}
119119
}

http-generator-helidon/src/main/java/io/avaje/http/generator/helidon/ControllerWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private void writeRoutes(List<ControllerMethodWriter> methods) {
6060

6161
private void writeClassStart() {
6262
writer.append(AT_GENERATED).eol();
63-
writer.append(ctx.getDIAnnotation()).eol();
63+
writer.append(ctx.diAnnotation()).eol();
6464
writer.append("public class ").append(shortName).append("$Route implements Service {").eol().eol();
6565

6666
String controllerName = "controller";

http-generator-javalin/src/main/java/io/avaje/http/generator/javalin/ControllerWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private void writeForMethod(MethodReader method) {
6767

6868
private void writeClassStart() {
6969
writer.append(AT_GENERATED).eol();
70-
writer.append(ctx.getDIAnnotation()).eol();
70+
writer.append(ctx.diAnnotation()).eol();
7171
writer
7272
.append("public class ")
7373
.append(shortName)

http-generator-jex/src/main/java/io/avaje/http/generator/jex/ControllerWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private void writeForMethod(MethodReader method) {
4747

4848
private void writeClassStart() {
4949
writer.append(AT_GENERATED).eol();
50-
writer.append(ctx.getDIAnnotation()).eol();
50+
writer.append(ctx.diAnnotation()).eol();
5151
writer.append("public class ").append(shortName).append("$Route implements Routing.Service {").eol().eol();
5252

5353
String controllerName = "controller";

http-generator-nima/src/main/java/io/avaje/http/generator/helidon/nima/ControllerWriter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import java.io.IOException;
66
import java.util.List;
77
import java.util.Map;
8-
import java.util.Set;
98

109
/**
1110
* Write Helidon specific web route adapter (a Helidon Service).
@@ -77,7 +76,7 @@ private void writeRoutes(List<ControllerMethodWriter> methods) {
7776

7877
private void writeClassStart() {
7978
writer.append(AT_GENERATED).eol();
80-
writer.append(ctx.getDIAnnotation()).eol();
79+
writer.append(ctx.diAnnotation()).eol();
8180
writer.append("public class %s$Route implements HttpService {", shortName).eol().eol();
8281

8382
var controllerName = "controller";

0 commit comments

Comments
 (0)