On Jul 16, 2010, at 4:58 PM, James Carman wrote:

> On Fri, Jul 16, 2010 at 5:48 PM, Matt Benson <[email protected]> wrote:
>> Consider it done, then.  :)
>> 
>> Poor birds.
>> 
> 
> Sorry, my wife has that "angry birds" application on her ipod touch,
> so I've been on a bird killing spree for the past few weeks.
> 

Just kidding around.  Anyway, I did just recall a trick I've learned from the 
Bean Validation podling code:  you don't necessarily have to pass in a 
reference to the class, so we could theoretically just have, e.g.:

<T> T createDelegatorProxy( ObjectProvider<?> delegateProvider, Class<?>... 
proxyClasses );

and, e.g.

Foo foo = proxyFactory.createDelegatorProxy(whocares, Foo.class, Bar.class) 
would compile properly.  The only drawback to this is that there is no 
requirement that Foo.class actually *be* one of the arguments to the method.  
At this point we would be relying on the client to do the right thing; if not 
he gets a classcastexception.  But the payoff is that we get 
single-arg/return-type and varargs/array processing from a single varargs 
method.

WDYT?

-Matt

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to