mirror of
https://github.com/corda/corda.git
synced 2025-06-14 05:08:18 +00:00
Implement Class#getDeclaredClasses
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@ -38,7 +38,18 @@ public class Reflection {
|
||||
if (! v) throw new RuntimeException();
|
||||
}
|
||||
|
||||
private static class Hello { }
|
||||
|
||||
private static void innerClasses() throws Exception {
|
||||
Class c = Reflection.class;
|
||||
Class[] inner = c.getDeclaredClasses();
|
||||
expect(1 == inner.length);
|
||||
expect(Hello.class == inner[0]);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
innerClasses();
|
||||
|
||||
Class system = Class.forName("java.lang.System");
|
||||
Field out = system.getDeclaredField("out");
|
||||
Class output = Class.forName("java.io.PrintStream");
|
||||
|
Reference in New Issue
Block a user