java - Change field value using cglib -
suppose have object field
of class java.lang.reflect.field
. possible change value of field of object o1
value of o2
`s field field.set(o1, o2)
. wondering whether can done faster of library, example cglib?
no, jvm implements jit compiler makes byte code generation obsolete performance in 99.9% of cases. in case of reflection, people sometime use code generation avoid security checks reflection api implies. rather that, should methodhandle
s moves security check handle creation such not triggered on each call.
Comments
Post a Comment