[forge-dev] questions about wildcard import [FORGE-367 - FORGE-563 - FORGE-424]

JFlower fiorenzino at gmail.com
Tue Oct 23 19:38:51 EDT 2012


Hi,

i started to find material to solve the bugs in object.

*1) (FORGE-367) [SOLVED] question: how add import with wildcard and/or
static:*

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);*

If you want we could add a new method:
*- javaClass.addStaticImport("org.junit.Assert.*");*

*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?

- Could we use the current ClassLoader and find all classes in that?

- Could we create some index with all classes inside all mvn
dependencies/modules jar [using jboss module capabilities?
using tattletale? ]

- Could we* *use jboss jandex to do that (also if jandex is processes Java
annotations)?
http://javahowto.blogspot.de/2012/08/how-to-run-jboss-jandex.html
https://github.com/jbossas/jandex/blob/master/src/main/java/org/jboss/jandex/JarIndexer.java


Have you some idea?


Fiorenzo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20121024/d2410210/attachment.html 


More information about the forge-dev mailing list