if (constructorInjectionPoints.size() > 1) {
throw new InjectionFailure("more than one constructor in "
+ type.getFullyQualifiedName() + " is marked as the injection point!");
}
final MetaConstructor constructor = constructorInjectionPoints.get(0);
for (Class<? extends Annotation> a : ctx.getDecoratorAnnotationsBy(ElementType.TYPE)) {
if (type.isAnnotationPresent(a)) {
DecoratorTask task = new DecoratorTask(injector, type, ctx.getDecorator(a));
injectionTasks.add(task);
}
}
return new ConstructionStrategy() {
@Override
public void generateConstructor() {
Statement[] parameterStatements = resolveInjectionDependencies(constructor.getParameters(), ctx, constructor);
IOCProcessingContext processingContext = ctx.getProcessingContext();
processingContext.append(
Stmt.declareVariable(type)