qdrzwd / dexmaker

Automatically exported from code.google.com/p/dexmaker
0 stars 0 forks source link

final method proxying #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Can  you  please  open  up  the  final  method  proxying  as  well in
getMethodsToProxy(...),  this  is  useful  for  AOP  style  proxying. Since  
subclassing  doesnt  allow  overriding  of  final  methods. Can  we  create  
method in  the  proxy  class  of  this  form:-
if  there  is a  final  method  of  this  form:-
public  final void finalMethod()
{

}
can  we  create a  method  in  the  proxy  class  of  this  form:-

public  final voidproxyFinalMethod()
{
  return super.finalMethod();
}

This  will  be  very  useful  in AOP  style  proxying where  the  proxies  can  
be generated and dumped  to  dex  file  and  then  woven  at  build  time  with 
 the  target  app.

Original issue reported on code.google.com by vipina...@gmail.com on 19 Sep 2012 at 4:57

GoogleCodeExporter commented 8 years ago
Not sure I follow. How would you invoke voidproxyFinalMethod ?

Original comment by limpbizkit on 10 Oct 2012 at 3:44

GoogleCodeExporter commented 8 years ago
Hey, I  just  cant  remember  the  context. Since  proxying  final  methods  
was  not  supported,  I did not  pursue  further.  is  it  possble  for  you  
to  allow  final  method  proxying  as well  so  that  AOP  style code  can  be 
 run  around  the  call.

Original comment by vipina...@gmail.com on 17 Oct 2012 at 8:44

GoogleCodeExporter commented 8 years ago
Hi,
I  have a  question:-
Is  it  possible  to  modify  the dexmaker  code  to  allow  final  and
 static  methods  to  proxy  through  the  dexmaker proxy? If  its
technically  possible  I could  try  modifying  the  code and  create  a
custom build  for my purposes. let me  know

Original comment by vipina...@gmail.com on 28 Oct 2012 at 8:51

GoogleCodeExporter commented 8 years ago
We aren't going to support proxying final methods. This would require rewriting 
the target dex file to be non-final, and that's horribly complicated.

Original comment by limpbizkit on 11 Feb 2013 at 12:00