[jboss-cvs] JBossAS SVN: r95220 - in projects/mc-ann/trunk: core/src/main/java/org/jboss/mcann/scanner and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 20 18:37:20 EDT 2009
Author: alesj
Date: 2009-10-20 18:37:19 -0400 (Tue, 20 Oct 2009)
New Revision: 95220
Modified:
projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/AnnotationScanner.java
projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/AbstractAnnotationScanner.java
projects/mc-ann/trunk/indexer/src/main/java/org/jboss/mcann/indexer/IndexerTask.java
projects/mc-ann/trunk/indexer/src/main/java/org/jboss/mcann/indexer/Main.java
Log:
Change scan signature.
Modified: projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/AnnotationScanner.java
===================================================================
--- projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/AnnotationScanner.java 2009-10-20 22:33:29 UTC (rev 95219)
+++ projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/AnnotationScanner.java 2009-10-20 22:37:19 UTC (rev 95220)
@@ -35,10 +35,10 @@
* Scan using the context class loader as well as the additional
* classloaders specified to resolve annotation class definitions.
*
+ * @param classLoader the class loader
* @param urls the URLs
- * @param classLoader the class loader
* @return The annotation repository
* @throws Exception for any error
*/
- AnnotationRepository scan(URL[] urls, ClassLoader classLoader) throws Exception;
+ AnnotationRepository scan(ClassLoader classLoader, URL... urls) throws Exception;
}
Modified: projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/AbstractAnnotationScanner.java
===================================================================
--- projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/AbstractAnnotationScanner.java 2009-10-20 22:33:29 UTC (rev 95219)
+++ projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/AbstractAnnotationScanner.java 2009-10-20 22:37:19 UTC (rev 95220)
@@ -21,18 +21,18 @@
*/
package org.jboss.mcann.scanner;
-import org.jboss.mcann.AnnotationRepository;
-import org.jboss.mcann.AnnotationScanner;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-
+import java.io.InputStream;
import java.io.ObjectInputStream;
-import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.GZIPInputStream;
+import org.jboss.mcann.AnnotationRepository;
+import org.jboss.mcann.AnnotationScanner;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+
/**
* Abstract annotation scanner.
*
@@ -41,8 +41,11 @@
*/
public abstract class AbstractAnnotationScanner<T extends AnnotationRepository> implements AnnotationScanner
{
- public AnnotationRepository scan(URL[] urls, ClassLoader classLoader) throws Exception
+ public AnnotationRepository scan(ClassLoader classLoader, URL... urls) throws Exception
{
+ if (urls == null)
+ throw new IllegalArgumentException("Null urls");
+
T repository = createAnnotationRepository(classLoader);
// something in javassist uses TCL
Modified: projects/mc-ann/trunk/indexer/src/main/java/org/jboss/mcann/indexer/IndexerTask.java
===================================================================
--- projects/mc-ann/trunk/indexer/src/main/java/org/jboss/mcann/indexer/IndexerTask.java 2009-10-20 22:33:29 UTC (rev 95219)
+++ projects/mc-ann/trunk/indexer/src/main/java/org/jboss/mcann/indexer/IndexerTask.java 2009-10-20 22:37:19 UTC (rev 95220)
@@ -205,7 +205,7 @@
AnnotationScanner as = AnnotationScannerFactory.getStrategy(AnnotationScannerFactory.JAVA_LANG_REFLECT);
URL[] urls = {input.toURI().toURL()};
URLClassLoader ucl = new URLClassLoader(urls);
- AnnotationRepository ari = as.scan(urls, ucl);
+ AnnotationRepository ari = as.scan(ucl, urls);
if (excludeAll)
{
Modified: projects/mc-ann/trunk/indexer/src/main/java/org/jboss/mcann/indexer/Main.java
===================================================================
--- projects/mc-ann/trunk/indexer/src/main/java/org/jboss/mcann/indexer/Main.java 2009-10-20 22:33:29 UTC (rev 95219)
+++ projects/mc-ann/trunk/indexer/src/main/java/org/jboss/mcann/indexer/Main.java 2009-10-20 22:37:19 UTC (rev 95220)
@@ -108,7 +108,7 @@
AnnotationScanner as = AnnotationScannerFactory.getStrategy(AnnotationScannerFactory.JAVA_LANG_REFLECT);
URL[] urls = {input.toURI().toURL()};
URLClassLoader ucl = new URLClassLoader(urls);
- AnnotationRepository ari = as.scan(urls, ucl);
+ AnnotationRepository ari = as.scan(ucl, urls);
m.store(ari, destination);
More information about the jboss-cvs-commits
mailing list