On Tuesday, June 13, 2017 at 5:55:33 PM UTC+2, James Nelson wrote:
>
>
>> Could that work if we complemented the "instanceof URLClassLoader" with 
>> some check for "is the system classloader" and then use 
>> System.getProperty("java.class.path") (or the equivalent 
>> ManagementFactory.getRuntimeMXBean().getClassPath()) to get the system 
>> classpath entries? (do we also need the bootclasspath?)
>>
>
Fwiw, I think it would work, according 
to 
https://github.com/AdoptOpenJDK/openjdk-jdk9/blob/f9129bba032f3b75be9b67f45636f76940e029a6/jdk/src/java.base/share/classes/jdk/internal/loader/ClassLoaders.java#L70-L73
(for now, I'm not interested in supporting modules, just making GWT 2 work 
in a Java 9 VM)

Another alternative is to go the way of apt and use something akin to 
> AnnotationMirror... meaning you can't just do MyAnnoClass anno = 
> member.getAnnotation(MyAnnoClass.class), but will instead be stuck 
> operating on a generic mirror which can get members by string name.  Not 
> exactly pretty, but if it's good enough for apt, it can clearly be made to 
> work (plus, with the impetus to ditch generators, we'd be stuck with it 
> anyway).
>

But isn't the whole issue with annotations due to JDT?
 

> I (also) have another project which converts AnnotationMirror to a proxy 
> of MyAnnoClass that can either load a dependent Class/Enum, or fail if that 
> class is not on classpath (but only fail if you try to access that member).
>

You mean like 
https://docs.oracle.com/javase/7/docs/api/javax/lang/model/element/Element.html#getAnnotation(java.lang.Class)
 ?
(ok, that one won't load the Class/enum from the classpath, but always 
throw when accessing members of those types)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/9c167014-1943-4d8c-9f3f-f3f4b8279480%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to