[weld-dev] Question about @Decorates
Gavin King
gavin.king at gmail.com
Fri Oct 23 16:57:22 EDT 2009
Does Weld currently require the use of @Inject on delegate injection points?
I've just noticed that with the change to the 330 annotations, it
perhaps makes more sense to change the name of this annotation and
require that @Inject be used, like this:
@Decorator
class TimestampLogger implements Logger {
private Logger logger;
@Inject
public TimestampLogger(@Delegate @Debug Logger logger) {
this.logger=logger;
}
...
}
@Decorator
class TimestampLogger implements Logger {
@Inject @Delegate @Any Logger logger;
...
}
We could perhaps even say that @Delegate is a qualifier.
--
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
More information about the weld-dev
mailing list