> 1) A generator uses the SystemCL. Not recommended because it won't see
> changes in client code unless hot-replace is working.
>
> 2) A generator uses TypeOracle. Recommended; changes are picked up on
> refresh.
>
> 3) A generator uses the TypeOracleClassLoader. Useful for interacting with
> reflection-based code, changes are picked up on refresh.
>
> I see no reason to support #1 in any way, or worry about mixed-use for #1
> and #3.
Just to be sure. We are talking at #3 about generator loaded in System
that is using TOCL?
I think we have a different opinion in only one thing. I'd like to
guarantee generators "identity" i.e. if this is generator code
Foo foo = (Foo) ctx.getTypeOracleClassLoader("com.foo.Foo"); even if
there is a new Foo available it will return the one from System since
Foo is directly referenced by the generator. On the other hand Class<?
> clazz = ctx.getTypeOracleClassLoader("com.Bar") will return class
from TOCL since it is not directly referenced by the generator.
Maybe I've again wanted to have it like this in order not to make any
changes to gin. How about TOCL doesn't worry about mixed-use but it
provides a way for the generator to get a fine grained functionality
over this?
Something like
ctx.getTypeOracleClassLoader().useSystemFor().startingWith
("com.foo.client.").equalTo("com.foo.client2.Baz").create();
in GIN's case we could then do
ctx.getTypeOracleClassLoader().useSystemFor().startingWith
("com.google.gwt.inject.").create(); and not worry about any
surprises.
> We're talking here about how to solve B with no regard for A.
Yes.
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---