On Thu, Aug 1, 2013 at 2:44 AM, Romain Manni-Bucau
<rmannibu...@gmail.com> wrote:
> ok,
>
> here it is: https://gist.github.com/rmannibucau/6128964
>

Thanks!

>
> 1) i didn't fully get the goal of stub module, any pointers?

It provides features very similar to the mocking support in libraries
like Mockito/EasyMock.  Basically, you can "train" a proxy to do what
you want in certain situations.

> 2) in ProxyFactory methods have this kind of signature
>
> <T> T createDelegatorProxy( ClassLoader classLoader, ObjectProvider<?>
> delegateProvider,
>                                         Class<?>... proxyClasses );
>
> why <T>if ObjectProvider is not ObjectProvider<T> (same for Object for
> others method). basically T isn't matched.
>

I'll have to take a look.  I believe the <T> is there for "syntactic
sugar", since you can pass in any classes you want really.  Hopefully
the user won't do something stupid and they'll actually pass Class<T>
as one of the proxyClasses when they're asking for a return type of
<T> back.  Since you can have multiple proxy classes, the
ObjectProvider can't really match any one particular one (it needs to
support all).

> 3) the jdk implementation uses InvocationHandler for the proxying, asm
> implementation has almost the same (i didn't check but i started from an
> exact copy), it would be great to get them in a common module to avoid to
> duplicate it
>

We have our own interface for InvocationHander, it's called Invoker.
Other libraries can be "adapted" to ours if you want to reuse
something.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to