staticvoid testProxy() {
MyInvocationHandler myHandler = new MyInvocationHandler();
MyInterface proxyMyInterface =
(MyInterface)Proxy.newProxyInstance(HotProxy.class.getClassLoader(), newClass<?>[] { MyInterface.class },
myHandler); // Invoke the proxy method multiple times to ensure it becomes hot and the JIT handles it. for (int i = 0; i < 0x10000; i++) {
proxyMyInterface.voidFoo();
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.