java - Bytecode enhancement for fields in a class -


is possible add "hooks" class via bytecode enhancement execute code whenever class field read or written? example, i'd automatically set "dirty" flag whenever new value assigned field.

if so, libraries best suited implement functionality?

here how generate getters , setters using asm framework. should started.

you can let bytecode-rewriter hook class-loader , rewriting on fly.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -