[forge-dev] questions about wildcard import [FORGE-367 - FORGE-563 - FORGE-424]
Lincoln Baxter, III
lincolnbaxter at gmail.com
Wed Oct 24 11:55:55 EDT 2012
On Tue, Oct 23, 2012 at 7:38 PM, JFlower <fiorenzino at gmail.com> wrote:
> i started to find material to solve the bugs in object.
> *1) (FORGE-367) [SOLVED] question: how add import with wildcard and/or
> see my comment: https://issues.jboss.org/browse/FORGE-367#comment-12728726
> In this version we accept wildcard inside the className and we accept
> static option:
> *- javaClass.addImport("org.junit.Assert.*").setStatic(true);*
I like the way you have solved this.
> If you want we could add a new method:
> *- javaClass.addStaticImport("org.junit.Assert.*");*
No, I don't think this is necessary. We should be able to make the right
> *2) (FORGE-563 - FORGE-424) question: creation of
> some WildcardImportResolver implementation* - where this resolver should
> find the complete className when we have some wildcard import?
That's the tricky part.
> - Could we use the current ClassLoader and find all classes in that?
Well... the problem is that we can't use the Current classloader because
that would be Forge's classloader. We need the classloader of the project,
which is not actually classloaded, so we would need to classload the
project (potentially very slow without an index.)
> - Could we create some index with all classes inside all mvn
> dependencies/modules jar [using jboss module capabilities?
> using tattletale? ]
> We need to do *something* - I'll leave it up to you to play with some
ideas and see what works well or not!
> - Could we* *use jboss jandex to do that (also if jandex is processes
> Java annotations)?
> Have you some idea?
> Nothing you haven't already mentioned :)
> forge-dev mailing list
> forge-dev at lists.jboss.org
Lincoln Baxter, III
"Simpler is better."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the forge-dev