Skip to content

Commit c96182e

Browse files
committed
- refactor/code cleanup merge trpc inside normal mapping
1 parent 129179e commit c96182e

4 files changed

Lines changed: 407 additions & 445 deletions

File tree

modules/jooby-apt/src/main/java/io/jooby/internal/apt/HttpPath.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ public List<String> path(Collection<TypeElement> hierarchy) {
3535
return path(hierarchy, getAnnotations());
3636
}
3737

38-
/**
39-
* Find path on type hierarchy. It goes back at hierarchy until it finds a Path annotation.
40-
*
41-
* @param hierarchy Type hierarchy.
42-
* @return Path or empty list.
43-
*/
44-
public List<String> trpcPath(Collection<TypeElement> hierarchy) {
45-
return path(hierarchy, List.of("io.jooby.annotation.Trpc"));
46-
}
47-
4838
private List<String> path(Collection<TypeElement> hierarchy, List<String> annotations) {
4939
var prefix = Collections.<String>emptyList();
5040
var it = hierarchy.iterator();

modules/jooby-apt/src/main/java/io/jooby/internal/apt/MvcContext.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,6 @@ public ProcessingEnvironment getProcessingEnvironment() {
8787
return processingEnvironment;
8888
}
8989

90-
/**
91-
* Find path from trpc route method and router type. This method scan and expand path base on the
92-
* annotation present at method or class level.
93-
*
94-
* @param owner Router type.
95-
* @param exec Method.
96-
* @param procedure Child path.
97-
* @return List of possible paths.
98-
*/
99-
public List<String> trpcPath(TypeElement owner, ExecutableElement exec, String procedure) {
100-
var prefix = HttpPath.PATH.trpcPath(superTypes(owner));
101-
if (prefix.isEmpty()) {
102-
return procedure.isEmpty() ? Collections.singletonList("/") : List.of(procedure);
103-
}
104-
return prefix.stream()
105-
.map(root -> root.equals("/") ? procedure : root + procedure)
106-
.distinct()
107-
.toList();
108-
}
109-
11090
/**
11191
* Find path from route method and router type. This method scan and expand path base on the
11292
* annotation present at method or class level.

0 commit comments

Comments
 (0)