I like the UnsafeConverter class example, especially because you define it in the annotation definition providers a nice context to make sure the pair is kept in sync (in terms of maintenance).
What is the value for unsafe on Sample?
I guess runtime should win over all just because of the principle of least surprise: it's explicitly specified in the invocation context, it would be a crime to override it even if this means less flexibility in terms of what people can change at configuration time.
After all, configuration is code too and you're free to not use a constant but source the runtime value from your own configuration means.
I like the UnsafeConverter class example, especially because you define it in the annotation definition providers a nice context to make sure the pair is kept in sync (in terms of maintenance).
I guess runtime should win over all just because of the principle of least surprise: it's explicitly specified in the invocation context, it would be a crime to override it even if this means less flexibility in terms of what people can change at configuration time.
After all, configuration is code too and you're free to not use a constant but source the runtime value from your own configuration means.