~/ learn/ comp-308/ cards/ Dynamic proxies (overview)
1 of 4

Type the InvocationHandler.invoke signature

Type the InvocationHandler.invoke signature

Answer

public Object invoke(Object proxy, Method m, Object[] args) throws Throwable { return m.invoke(real, args); }

Every call on a dynamic proxy is funnelled into invoke(proxy, method, args). The handler typically delegates to the real target with m.invoke(real, args), wrapping behaviour (logging, timing) around the call.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/96c52b3f-6ceb-4c51-8d75-96ab8087d04e/flashcard utf-8 LF