mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-25 14:39:38 +08:00
868f43d886
* libjava.lang/KeepInline.java: New file. * libjava.lang/KeepInline.out: New file. From-SVN: r44540
19 lines
569 B
Java
19 lines
569 B
Java
// Demonstrate that private methods can be reflected even if they are
|
|
// not referenced at compile-time (i.e. -fkeep-inline-functions works).
|
|
import java.lang.reflect.Method;
|
|
public class KeepInline {
|
|
private void example() {
|
|
System.out.println("example");
|
|
}
|
|
public static void main(String[] args) {
|
|
try {
|
|
KeepInline pr = new KeepInline();
|
|
Method[] meths = pr.getClass().getDeclaredMethods();
|
|
for (int n = 0; n < meths.length; n++)
|
|
System.out.println(meths[n]);
|
|
} catch (Throwable t) {
|
|
t.printStackTrace();
|
|
}
|
|
}
|
|
}
|