All,
I was just thinking about alternatives and producer methods. Suppose I have the following bean:
@ApplicationScoped
public class Boop {
@Produces
@ApplicationScoped
public Simpler makeSimpler() {
return new Simpler("Boop");
}
}
If I want to override the producer method, I need to declare fully:
@Alternative
@Priority(100)
@ApplicationScoped
public class BoopAlternative extends Boop{
@Override
@Produces
public Simpler makeSimpler() {
return new Simpler("Boop2");
}
}
For some reason, scopes are inherited, but the produces annotation is not. At least in the case of a producer method, it seems like it would be useful for @Produces to be inherited as well.
John