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 got this error while preparing my mailing list post:
Error at RealBookService$RealBookShelf.<init>(RealBookService.java:48):
Could not find a suitable constructor in RealBookService$RealBookShelf.
Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor.
This error doesn't mention the fact that if the offending class is an inner
class, it must be a static inner class. This is nitpicky, but Guice has
very high standards for error messages.
Offtopic - how does one instantaite a non-static inner class reflectively?
I typically wouldn't recommend instantiating an inner class reflectively, but if you
really want to, inner classes just take an instance of their outer class in the
constructor (in addition to the other parameters).
From limpbizkit on April 04, 2007 19:43:11
I got this error while preparing my mailing list post:
Could not find a suitable constructor in RealBookService$RealBookShelf.
Classes must have either one (and only one) constructor annotated with
@
Inject or a zero-argument constructor.This error doesn't mention the fact that if the offending class is an inner
class, it must be a static inner class. This is nitpicky, but Guice has
very high standards for error messages.
Offtopic - how does one instantaite a non-static inner class reflectively?
Original issue: http://code.google.com/p/google-guice/issues/detail?id=85
The text was updated successfully, but these errors were encountered: