OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [KeepInline.java] - Blame information for rev 767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// Demonstrate that private methods can be reflected even if they are
2
// not referenced at compile-time (i.e. -fkeep-inline-functions works).
3
import java.lang.reflect.Method;
4
public class KeepInline {
5
  private void example() {
6
    System.out.println("example");
7
  }
8
  public static void main(String[] args) {
9
    try {
10
      KeepInline pr = new KeepInline();
11
      Method[] meths = pr.getClass().getDeclaredMethods();
12
      for (int n = 0; n < meths.length; n++)
13
        System.out.println(meths[n]);
14
    } catch (Throwable t) {
15
      t.printStackTrace();
16
    }
17
  }
18
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.