commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject [sandbox] [classscan] classscan API design review needed
Date Tue, 26 Jul 2011 21:19:10 GMT
Hi folks!

We need a few idea and brainstorming on the filter/selection mechanism for our new classscan-api
(yes, 3 's' in classscan). 

There are some specs which require some marker files to actually enable the class scanning.
E.g. the JSR-299 CDI spec defines that only jars with META-INF/beans.xml get scanned. For
JSR-314 (JSF2) you need to have a META-INF/faces-config.xml marker file present. 
Other frameworks don't have such a restriction, but most do.

There are 2 ways to handle this:
1.) each classscan-client tells the classscan-server the list of marker files it needs.
2.) The classscan-client registers a Filter callback (similar to Simos mechanism) and the
classcan-server calls a 'scanningJarStarted(...)' and scanningJarEnded (bet we find some better
name which also would fit in OSGi environments) and the Filter can call some veto() or subscribe()
to the classscan-server.

We also need some way to include + exclude packages from the scanning. Any idea on the API
is welcome. The current ScanJob class (see my github [1]) which was supposed to be an upfront
information doesn't work out in the end I fear. But maybe it's a starting point for our discussion.
 


txs and LieGrue,
strub

[1] https://github.com/struberg/Apache-commons-classscanner/blob/b45c1b6080e91f6e36f7b7a39aa1b2c4d7bde1e0/classscan-api/src/main/java/org/apache/commons/classscan/api/ScanJob.java

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message