I have a situation where we have a class with a factory provided by
AssistedInject.  The class is package private, and the factory is an
interface defined in the class.  For example:

   class FooImpl implements Foo {
       static interface Factory {
           FooImpl create(@Assisted Param param);
       }
   }

The impl has the factory because the user of it is in the same package &
needs the specifics of the implementation, not the interface.  What is
incredibly strange is that if I made the factory public, ie: "public static
interface Factory", then I receive the following exception when calling
create on the assisted-inject-created Factory:
  java.lang.IllegalAccessError: tried to access class FooImpl from class
$Proxy44 at $Proxy44.create(Unknown Source)

If I remove the "public" modifier (so the interface is considered
package-private), the exception goes away & things work swimmingly.

Anyone have any ideas about this?  It seems more related to the way Proxy
works than with AssistedInject, but I figured I'd open the floor..

Thanks!

Sam

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to