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
This is, of course, permissible in Java 8 as you can associate static methods with interfaces. However, when you use FactoryModuleBuilder on it, as so:
There is an error along the lines of the following:
Factory is an interface, not a concrete class. Unable to create AssistedInject factory.
This does not seem to be intuitive, because Factory is supposed to be an interface. Debugging this code reveals that this is in reference to the static method, which should, by all means, not be considered because of its static-ness. Indeed, FactoryProvider2's constructor does not appear to skip over static methods, as expected.
Of course, a workaround exists simply by moving the static method away from the factory interface, but this seems like a bug in the functionality of FactoryProvider2 specifically.
The text was updated successfully, but these errors were encountered:
Consider the following assisted inject factory interface:
This is, of course, permissible in Java 8 as you can associate static methods with interfaces. However, when you use
FactoryModuleBuilder
on it, as so:There is an error along the lines of the following:
This does not seem to be intuitive, because
Factory
is supposed to be an interface. Debugging this code reveals that this is in reference to the static method, which should, by all means, not be considered because of its static-ness. Indeed,FactoryProvider2
's constructor does not appear to skip over static methods, as expected.Of course, a workaround exists simply by moving the static method away from the factory interface, but this seems like a bug in the functionality of
FactoryProvider2
specifically.The text was updated successfully, but these errors were encountered: