return new FieldInjector(field, new ListMultiplicityObjectFactory(factories));
}
} else if (element.getAnchor() instanceof Method) {
Method method = (Method)element.getAnchor();
if (method.getParameterTypes()[0].isArray()) {
return new MethodInjector(method, new ArrayMultiplicityObjectFactory(interfaceType, factories));
} else {
return new MethodInjector(method, new ListMultiplicityObjectFactory(factories));
}
} else {
throw new InvalidAccessorException("Member must be a field or method: " + element.getName());
}
}