boolean success = writeToFile(memberInjectorGenerator, fileDescription, typeElement); if (success) { elementsWithMemberInjectorCreated.add(typeElement); writeToFile(new RegistryGenerator(registryInjectionTarget, typeUtils), fileDescription, allTypes);
@Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { readCommonProcessorOptions(); readOptionCrashWhenMethodIsNotPackageProtected(); mapTypeElementToFieldInjectorTargetList = new LinkedHashMap<>(); mapTypeElementToMethodInjectorTargetList = new LinkedHashMap<>(); mapTypeElementToSuperTypeElementThatNeedsInjection = new LinkedHashMap<>(); findAndParseTargets(roundEnv); // Generate member scopes Set<TypeElement> elementWithInjectionSet = new HashSet<>(); elementWithInjectionSet.addAll(mapTypeElementToFieldInjectorTargetList.keySet()); elementWithInjectionSet.addAll(mapTypeElementToMethodInjectorTargetList.keySet()); for (TypeElement typeElement : elementWithInjectionSet) { List<FieldInjectionTarget> fieldInjectionTargetList = mapTypeElementToFieldInjectorTargetList.get(typeElement); List<MethodInjectionTarget> methodInjectionTargetList = mapTypeElementToMethodInjectorTargetList.get(typeElement); TypeElement superClassThatNeedsInjection = mapTypeElementToSuperTypeElementThatNeedsInjection.get(typeElement); MemberInjectorGenerator memberInjectorGenerator = new MemberInjectorGenerator(typeElement, // superClassThatNeedsInjection, // fieldInjectionTargetList, // methodInjectionTargetList, // typeUtils); String fileDescription = String.format("MemberInjector for type %s", typeElement); writeToFile(memberInjectorGenerator, fileDescription, typeElement); allRoundsGeneratedToTypeElement.put(memberInjectorGenerator.getFqcn(), typeElement); } return false; }
new MemberInjectorGenerator(typeElement, superClassThatNeedsInjection, fieldInjectionTargetList, methodInjectionTargetList); String fileDescription = String.format("MemberInjector for type %s", typeElement); boolean success = writeToFile(memberInjectorGenerator, fileDescription, typeElement); if (success) { elementsWithMemberInjectorCreated.add(typeElement); writeToFile(registryGenerator, fileDescription, allTypes);