You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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:
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 usingArrays.asList()
, but it would be better if AutoFactory just supported varargs parameters directly.The text was updated successfully, but these errors were encountered: