fix: repeatable annotation support fix, part 2

This commit is contained in:
zaaarf 2023-03-15 12:25:59 +01:00
parent 38dd9ae869
commit 8fd7006a34
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C

View file

@ -360,7 +360,7 @@ public class LilleroProcessor extends AbstractProcessor {
String packageName = packageElement.toString(); String packageName = packageElement.toString();
//find injector(s) and target(s) //find injector(s) and target(s)
List<ExecutableElement> injectors = findAnnotatedMethods(cl, MultipleInjectors.class); List<ExecutableElement> injectors = findAnnotatedMethods(cl, Injector.class);
List<ExecutableElement> targets = findAnnotatedMethods(cl, Target.class); List<ExecutableElement> targets = findAnnotatedMethods(cl, Target.class);
@ -375,9 +375,9 @@ public class LilleroProcessor extends AbstractProcessor {
Map<String, InjectorInfo> toGenerate = new HashMap<>(); Map<String, InjectorInfo> toGenerate = new HashMap<>();
for(ExecutableElement inj : injectors) { for(ExecutableElement inj : injectors) {
MultipleInjectors minjAnn = inj.getAnnotation(MultipleInjectors.class); Injector[] minjAnn = inj.getAnnotationsByType(Injector.class);
int iterationNumber = 1; int iterationNumber = 1;
for(Injector injectorAnn : minjAnn.value()) { //java is dumb for(Injector injectorAnn : minjAnn) { //java is dumb
List<ExecutableElement> injectionCandidates = targets; List<ExecutableElement> injectionCandidates = targets;
//case 1: it has a name, try to match it //case 1: it has a name, try to match it