@@ -124,7 +124,7 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
124124
125125 private void build (Filer filer ) throws Exception {
126126 Types typeUtils = processingEnv .getTypeUtils ();
127- Map <String , List <HandlerCompiler >> classes = new LinkedHashMap <>();
127+ Map <TypeElement , List <HandlerCompiler >> classes = new LinkedHashMap <>();
128128 for (Map .Entry <TypeElement , Map <TypeElement , List <ExecutableElement >>> e : routeMap
129129 .entrySet ()) {
130130 TypeElement type = e .getKey ();
@@ -150,7 +150,6 @@ private void build(Filer filer) throws Exception {
150150 }
151151 }
152152 }
153- String typeName = typeUtils .erasure (type .asType ()).toString ();
154153 /** Route method ready, creates a Route.Handler for each of them: */
155154 for (Map .Entry <TypeElement , List <ExecutableElement >> mapping : mappings .entrySet ()) {
156155 TypeElement httpMethod = mapping .getKey ();
@@ -162,7 +161,7 @@ private void build(Filer filer) throws Exception {
162161 debug (" route %s %s" , httpMethod .getSimpleName (), path );
163162 HandlerCompiler compiler = new HandlerCompiler (processingEnv , type , method ,
164163 httpMethod , path );
165- classes .computeIfAbsent (typeName , k -> new ArrayList <>())
164+ classes .computeIfAbsent (type , k -> new ArrayList <>())
166165 .add (compiler );
167166 }
168167 }
@@ -171,18 +170,20 @@ private void build(Filer filer) throws Exception {
171170 }
172171
173172 List <String > moduleList = new ArrayList <>();
174- for (Map .Entry <String , List <HandlerCompiler >> entry : classes .entrySet ()) {
173+ for (Map .Entry <TypeElement , List <HandlerCompiler >> entry : classes .entrySet ()) {
174+ TypeElement type = entry .getKey ();
175+ String typeName = typeUtils .erasure (type .asType ()).toString ();
175176 List <HandlerCompiler > handlers = entry .getValue ();
176- ModuleCompiler module = new ModuleCompiler (processingEnv , entry . getKey () );
177+ ModuleCompiler module = new ModuleCompiler (processingEnv , typeName );
177178 String moduleClass = module .getModuleClass ();
178179 byte [] moduleBin = module .compile (handlers );
179180 onClass (moduleClass , moduleBin );
180- writeClass (filer .createClassFile (moduleClass ), moduleBin );
181+ writeClass (filer .createClassFile (moduleClass , type ), moduleBin );
181182
182183 moduleList .add (moduleClass );
183184 }
184185
185- doServices (filer , moduleList );
186+ // doServices(filer, moduleList);
186187 }
187188
188189 private String signature (ExecutableElement method ) {
0 commit comments