On Wed, Oct 29, 2008 at 8:22 AM, Stuart McCulloch <[EMAIL PROTECTED]> wrote:

> your current solution relies on reading the classfile from the current
> classloader
> by using getResourceAsStream(), but I don't think this is guaranteed to
> work in
> all situations - a safer solution would be to use ASM to generate the
> bytecode
> at runtime (downside: even more code and less readable)
>

I think it'll work 99% of the time, and it can fail back to loading the
class directly in the remaining cases. If it becomes an issue, we can just
put the class in a constant byte[].


> but then again, the ASM generated class could be very simple, perhaps just
> a loop that calls a Callable<Boolean> object passed in via the constructor?
>

Presumably, the Callable<Boolean> would be implemented by a Guice class, so
you'd have a leak.

Bob

--~--~---------~--~----~------------~-------~--~----~
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