KeepInline.java: New file.

* libjava.lang/KeepInline.java: New file.
	* libjava.lang/KeepInline.out: New file.

From-SVN: r44540
This commit is contained in:
Jeff Sturm 2001-08-01 12:40:06 +00:00 committed by Jeff Sturm
parent 9042f830ca
commit 868f43d886
3 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2001-08-01 Jeff Sturm <jsturm@one-point.com>
* libjava.lang/KeepInline.java: New file.
* libjava.lang/KeepInline.out: New file.
2001-07-30 Jeff Sturm <jsturm@one-point.com>
* libjava.lang/SyncTest.java: New file.

View File

@ -0,0 +1,18 @@
// 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();
}
}
}

View File

@ -0,0 +1,2 @@
private void KeepInline.example()
public static void KeepInline.main([Ljava.lang.String;)