4 ms·
But they are in my opinion really difficult to understand, test or customize. In the example above, the reified Option<boolean[]> can be passed around, transfor
by joshlemer 7y ago
But they are in my opinion really difficult to understand, test or customize. In the example above, the reified Option<boolean[]> can be passed around, transformed, inspected, invoked in tests, etc. The annotation approach weaves together the aggregate class (the overarching config class), the specific field of the class (`verbose`) and how that field should be parsed from command line arguments.
- eitland 7y agoOk. I can try to help: In this particular case, when you test you just set the field to what you want. In other cases where you actually want and need to test that the annotations works at runtime you use a test container (Arquillian was the big thing for integration testing JavaEE last time it was relevant to me, and since we are talking enterprise Java there's a fair chance that Arquillian will still work and maybe even still be the most popular solution.)