-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
I'm trying to convert an existing type to be partially injected using autofactory, but our existing constructors and client code makes use of varargs to pass in differing numbers of arguments.
For example:
@AutoFactory
class MyClass {
public MyClass(@Provided InjectedParameter ip, RepeatedParameter... rp) {
// ...
}
}However the signature of the corresponding create method is: MyClassFactory.create(RepeatedParameter[] rp) which rather defeats the point.
It's possible to work around this by changing the signature to accept a List<RepeatedParameter> and using Arrays.asList(), but it would be better if AutoFactory just supported varargs parameters directly.
Reactions are currently unavailable