fixed codegen so it applies final stuff when running using annotations
test for generic method