sun.jvm.hotspot.utilities.MethodArray Java Examples
The following examples show how to use
sun.jvm.hotspot.utilities.MethodArray.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CommandProcessor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public void doit(Tokens t) { if (t.countTokens() != 0) { usage(); } else { SystemDictionary sysDict = VM.getVM().getSystemDictionary(); sysDict.allClassesDo(new SystemDictionary.ClassVisitor() { public void visit(Klass k) { if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) { MethodArray methods = ((InstanceKlass)k).getMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); HTMLGenerator gen = new HTMLGenerator(false); out.println(gen.genHTML(m)); } } } } ); } }
Example #2
Source File: CommandProcessor.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public void doit(Tokens t) { if (t.countTokens() != 0) { usage(); } else { SystemDictionary sysDict = VM.getVM().getSystemDictionary(); sysDict.allClassesDo(new SystemDictionary.ClassVisitor() { public void visit(Klass k) { if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) { MethodArray methods = ((InstanceKlass)k).getMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); HTMLGenerator gen = new HTMLGenerator(false); out.println(gen.genHTML(m)); } } } } ); } }
Example #3
Source File: CommandProcessor.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public void doit(Tokens t) { if (t.countTokens() != 0) { usage(); } else { SystemDictionary sysDict = VM.getVM().getSystemDictionary(); sysDict.allClassesDo(new SystemDictionary.ClassVisitor() { public void visit(Klass k) { if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) { MethodArray methods = ((InstanceKlass)k).getMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); HTMLGenerator gen = new HTMLGenerator(false); out.println(gen.genHTML(m)); } } } } ); } }
Example #4
Source File: CommandProcessor.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public void doit(Tokens t) { if (t.countTokens() != 0) { usage(); } else { SystemDictionary sysDict = VM.getVM().getSystemDictionary(); sysDict.allClassesDo(new SystemDictionary.ClassVisitor() { public void visit(Klass k) { if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) { MethodArray methods = ((InstanceKlass)k).getMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); HTMLGenerator gen = new HTMLGenerator(false); out.println(gen.genHTML(m)); } } } } ); } }
Example #5
Source File: CommandProcessor.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public void doit(Tokens t) { if (t.countTokens() != 0) { usage(); } else { SystemDictionary sysDict = VM.getVM().getSystemDictionary(); sysDict.allClassesDo(new SystemDictionary.ClassVisitor() { public void visit(Klass k) { if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) { MethodArray methods = ((InstanceKlass)k).getMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); HTMLGenerator gen = new HTMLGenerator(false); out.println(gen.genHTML(m)); } } } } ); } }
Example #6
Source File: CommandProcessor.java From hottub with GNU General Public License v2.0 | 6 votes |
public void doit(Tokens t) { if (t.countTokens() != 0) { usage(); } else { SystemDictionary sysDict = VM.getVM().getSystemDictionary(); sysDict.allClassesDo(new SystemDictionary.ClassVisitor() { public void visit(Klass k) { if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) { MethodArray methods = ((InstanceKlass)k).getMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); HTMLGenerator gen = new HTMLGenerator(false); out.println(gen.genHTML(m)); } } } } ); } }
Example #7
Source File: CommandProcessor.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public void doit(Tokens t) { if (t.countTokens() != 0) { usage(); } else { SystemDictionary sysDict = VM.getVM().getSystemDictionary(); sysDict.allClassesDo(new SystemDictionary.ClassVisitor() { public void visit(Klass k) { if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) { MethodArray methods = ((InstanceKlass)k).getMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); HTMLGenerator gen = new HTMLGenerator(false); out.println(gen.genHTML(m)); } } } } ); } }
Example #8
Source File: CommandProcessor.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public void doit(Tokens t) { if (t.countTokens() != 0) { usage(); } else { SystemDictionary sysDict = VM.getVM().getSystemDictionary(); sysDict.allClassesDo(new SystemDictionary.ClassVisitor() { public void visit(Klass k) { if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) { MethodArray methods = ((InstanceKlass)k).getMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); HTMLGenerator gen = new HTMLGenerator(false); out.println(gen.genHTML(m)); } } } } ); } }
Example #9
Source File: TestCpoolForInvokeDynamic.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static void printBytecodes(String pid, String[] instanceKlassNames) { HotSpotAgent agent = new HotSpotAgent(); try { agent.attach(Integer.parseInt(pid)); } catch (DebuggerException e) { System.out.println(e.getMessage()); System.err.println("Unable to connect to process ID: " + pid); agent.detach(); e.printStackTrace(); } for (String instanceKlassName : instanceKlassNames) { InstanceKlass iKlass = SystemDictionaryHelper.findInstanceKlass(instanceKlassName); MethodArray methods = iKlass.getMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); System.out.println("Method: " + m.getName().asString() + " in instance klass: " + instanceKlassName); HTMLGenerator gen = new HTMLGenerator(false); System.out.println(gen.genHTML(m)); } } agent.detach(); }
Example #10
Source File: TestDefaultMethods.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static void printDefaultMethods(String pid, String[] instanceKlassNames) { HotSpotAgent agent = new HotSpotAgent(); try { agent.attach(Integer.parseInt(pid)); } catch (DebuggerException e) { System.out.println(e.getMessage()); System.err.println("Unable to connect to process ID: " + pid); agent.detach(); e.printStackTrace(); } for (String instanceKlassName : instanceKlassNames) { InstanceKlass iKlass = SystemDictionaryHelper.findInstanceKlass(instanceKlassName); MethodArray methods = iKlass.getMethods(); MethodArray defaultMethods = iKlass.getDefaultMethods(); for (int i = 0; i < methods.length(); i++) { Method m = methods.at(i); System.out.println("Method: " + m.getName().asString() + " in instance klass: " + instanceKlassName); } if (defaultMethods != null) { for (int j = 0; j < defaultMethods.length(); j++) { Method dm = defaultMethods.at(j); System.out.println("Default method: " + dm.getName().asString() + " in instance klass: " + instanceKlassName); } } else { System.out.println("No default methods in " + instanceKlassName); } } agent.detach(); }