Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11852

Re: Dynamic method invocation on Proxy object?

From Sebastian <sebastian@undisclosed.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Dynamic method invocation on Proxy object?
Date 2012-02-08 15:16 +0100
Organization albasani.net
Message-ID <jgu04d$vdc$1@news.albasani.net> (permalink)
References <jgtb77$hsu$1@news.albasani.net> <hmv909-bic.ln1@news.simpsonst.f2s.com>

Show all headers | View raw


Am 08.02.2012 11:34, schrieb Steven Simpson:
> On 08/02/12 08:19, Sebastian wrote:
>> However, when delegate is itself a proxy, then delegate.getClass()
>> will give me Proxy,
>
> Are you sure? I get $Proxy0 from this:
>
[coding snipped]
>
> Output:
>
> Proxy class is: class $Proxy0
> Called public abstract void java.lang.Runnable.run()
> Called public abstract void java.lang.Runnable.run()
>
> It also demonstrates a method on the implemented interface being looked
> up and invoked.

Thanks for that. I found my mistake - the reason that I could not find 
the target method turned out to be different classloaders for the 
argument types, so the signatures did not match.

-- Sebastian

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Dynamic method invocation on Proxy object? Sebastian <sebastian@undisclosed.invalid> - 2012-02-08 09:19 +0100
  Re: Dynamic method invocation on Proxy object? Steven Simpson <ss@domain.invalid> - 2012-02-08 10:34 +0000
    Re: Dynamic method invocation on Proxy object? Sebastian <sebastian@undisclosed.invalid> - 2012-02-08 15:16 +0100

csiph-web