|
|
|
|
|
by mbell
4661 days ago
|
|
> By dynamic I think he just means that annotations are a really hacky way to do things. Why? > You use annotations in place of java code, and while you can tweak java code you can't tweak what an annotation does or how it does it. Why can't you tweak an annotation? Annotations are built into the language, the entire point of them is to allow code to detect their presence in the bytecode and thus react at runtime. e.g. wrap a method marked as @Transactional in a database transaction. |
|
Edit: and they're hacky because they're magical--it's entirely not obvious what they're doing.