~/ 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/4921f4ce-0cf6-45be-82ed-9433d4ccdf22/flashcard utf-8 LF