This content has been marked as final.
Show 1 reply
-
1. Re: @CodeDecorator and 4.0.0-SNAPSHOT
mbarkley Nov 16, 2015 10:33 AM (in response to treblereel)Hi Dmitrii,
I was able to get the decorator working in your sample project by adding an explicit scope to the CheckClient class. What was happening is that Errai was ignoring your CheckClient class because it was not injected in any other types and had no explicit scope. Errai considers types like these to be unreachable and does not generate code to wire them to avoid generating code for types you are not injecting. Since no wiring code was generated for this class, the decorator for its Check annotation did not run.
If you verify that this is the problem you're having in your actual project, there are a couple ways of fixing it.
- You can manually add @Dependent to all your unscoped, decorated types.
- You can make an extension that defines your annotation as an alias for @Dependent (like we do here for @Templated).
Cheers.