private static void ToConsole(JavaArchiveReflector r) { Console.WriteLine("files: " + r.Count); foreach (JavaArchiveReflector.Entry item in r) { if (item.Type != null) { Console.WriteLine(".class " + item.Type.AssemblyQualifiedName); foreach (var m in item.Methods) { Console.WriteLine(" .method " + m.Name); Console.WriteLine(" .return " + m.ReturnType.AssemblyQualifiedName); foreach (var p in m.GetParameters()) { Console.WriteLine(" .param " + p.ParameterType.AssemblyQualifiedName); } } Console.WriteLine("first class done!"); break; } } }
private static void InternalMain() { Console.WriteLine("this code is running inside JVM 1"); var x = new FileInfo(@"C:\util\aws-android-sdk-0.2.0\lib\aws-android-sdk-0.2.0-ec2.jar"); Console.WriteLine(x.FullName); var r = new JavaArchiveReflector(x); r.JavaArchiveResolve += name => { var xx = CLRProgram.JavaArchiveResolve(r.FileNameString, name); if (null == xx) return null; return new FileInfo(xx); }; ToConsole(r); }