* @throws Throwable if caused by the delegate or the method
* @see #invokeCustom(Object, Method, Object[])
* @see InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
*/
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
VMPlugin plugin = VMPluginFactory.getPlugin();
if (plugin.getVersion()>=7 && isDefaultMethod(method)) {
Object handle = handleCache.get(method);
if (handle == null) {
handle = plugin.getInvokeSpecialHandle(method, proxy);
handleCache.put(method, handle);
}
return plugin.invokeHandle(handle, args);
}
if (!checkMethod(method)) {
try {
return invokeCustom(proxy, method, args);