qdrzwd / dexmaker

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

ProxyBuilder tries to proxy private and package-private methods #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Using ProxyBuilder to subclass android.view.View produces errors because the 
generated proxy overrides private and package-private methods. 

IMO only public and protected methods should be proxied. 

This is with today's git snapshot. The attached patch should fix the problem.

Here's a stack trace caused by ProxyBuilder trying to invoke a package-private 
super method:

java.lang.IllegalAccessError: tried to access method 
android.view.View.getListenerInfo:()Landroid/view/View$ListenerInfo; from class 
View_Proxy
at View_Proxy.super_getListenerInfo(View_Proxy.generated)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.google.dexmaker.stock.ProxyBuilder.callSuper(ProxyBuilder.java:504)

Original issue reported on code.google.com by hann...@gmail.com on 12 Jan 2012 at 1:38

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by jessewil...@google.com on 2 Apr 2012 at 2:44

GoogleCodeExporter commented 8 years ago
I couldn't reproduce this. I think we must have fixed it.

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