I tested a simple class (all of these methods were not found):
public class Test { private void privateMethod() { System.out.println("private"); } protected void protectedMethod() { System.out.println("protected"); } public void publicMethod() { System.out.println("public"); } void method() { System.out.println("method"); } }
I compiled the APK, extracted Test.class
and decompiled it (using javap -c
). I got the following results. I also tested using jar instead of APK, and the result was exactly the same. I used Java 1.6.0_29.
protected void protectedMethod(); Code: 0: getstatic #44
This means that only private functions are excluded during compilation.
I also tried to declare the class final
, but the result was the same.
source share