Thanks Sam. By reading about those SPI extensions, I found the way to get 
the implementation type in the matches() method :

https://gist.github.com/electrotype/6299241

So it's now working! All my tests passed even with the *IInitableAfterCreation 
*interface set on the implementation classes.

The only thing I'd like to be sure is if I do I have to check for other 
kind of binders than *ConstructorBinding* for my bindListener to always 
work? Or is this the only case where a direct *
binding.getKey().getTypeLiteral().getRawType()* won't be the type that has 
to be validated agains the *IInitableAfterCreation *interface? In my 
application, for now, checking for *ConstructorBinding* seems to be enough.



On Wednesday, August 21, 2013 2:18:55 PM UTC-4, Sam Berlin wrote:
>
> I think what Stuart is saying is that the Binding itself doesn't expose 
> the info because, well, it doesn't have the info.  You need to use 
> theAssistedInject SPI 
> extension<https://code.google.com/p/google-guice/wiki/AssistedInject#Inspecting_AssistedInject_Bindings_(new_in_Guice_3.0)>to
>  get the info you want.  The 
> getAssistedMethod<http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/assistedinject/AssistedInjectBinding.html>method
>  should expose the info you want in 
> AssistedMethod<http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/assistedinject/AssistedMethod.html>
> .
>
>  sam
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to