Adding @Inherited would have no effect because @Provides is used to annotate
methods and @Inherited only affects annotations on classes:
"Note that this meta-annotation type has no effect if the annotated
type is used to annotate anything other than a class"
from
http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Inherited.html
Have you tried using something like:
@Provides public final Something providesSomething() {return
getSomething();}
public abstract Something getSomething();
Although IMHO it is better to have @Provides closer to the implementation
rather than squirrelled away somewhere in the class hierarchy
On 2 Jul 2013, at 10:45, Francis Galiegue wrote:
> Hello,
>
> Given the way my modules are currently written, I need to have a base
> abstract module and have concrete implementations be the "real"
> modules.
>
> However, given that @Provides is not @Inherited, I cannot use:
>
> @Provides
> public abstract Something getSomething();
>
> Is it on purpose? Am I doing things the wrong way?
>
> --
> Francis Galiegue, [email protected]
> JSON Schema in Java: http://json-schema-validator.herokuapp.com
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.