[weld-commits] Weld SVN: r6236 - in java-se/trunk/src/main/java/org/jboss/weld/environment/se: discovery and 1 other directory.
weld-commits at lists.jboss.org
weld-commits at lists.jboss.org
Mon May 17 09:25:38 EDT 2010
Author: peteroyle
Date: 2010-05-17 09:25:37 -0400 (Mon, 17 May 2010)
New Revision: 6236
Modified:
java-se/trunk/src/main/java/org/jboss/weld/environment/se/Weld.java
java-se/trunk/src/main/java/org/jboss/weld/environment/se/discovery/URLScanner.java
Log:
WELDSE-26: Renamed ClassHandler to URLHandler (part 2)
Modified: java-se/trunk/src/main/java/org/jboss/weld/environment/se/Weld.java
===================================================================
--- java-se/trunk/src/main/java/org/jboss/weld/environment/se/Weld.java 2010-05-17 13:18:43 UTC (rev 6235)
+++ java-se/trunk/src/main/java/org/jboss/weld/environment/se/Weld.java 2010-05-17 13:25:37 UTC (rev 6236)
@@ -84,7 +84,7 @@
final ResourceLoader resourceLoader = deployment.getServices().get(ResourceLoader.class);
URLScanner scanner = new URLScanner(resourceLoader, discovery);
- configureClassHandlers(scanner, resourceLoader, discovery);
+ configureURLHandlers(scanner, resourceLoader, discovery);
scanner.scanResources(new String[]
{
"META-INF/beans.xml"
@@ -106,19 +106,19 @@
}
/**
- * Clients can subclass and override this method to add custom class handlers
- * before weld boots up. For example, to set a custom class handler for OSGi bundles,
+ * Clients can subclass and override this method to add custom URL handlers
+ * before weld boots up. For example, to set a custom URL handler for OSGi bundles,
* you would subclass Weld like so:
* <code>
* public class MyWeld extends Weld {
* @Override
- * public void configureClassHandlers(URLScanner scanner, ResourceLoader resourceLoader, SEWeldDiscovery discovery)
- * scanner.setClassHandler("bundle", new MyOSGiClassHandler(bundleClassLoader));
+ * public void configureURLHandlers(URLScanner scanner, ResourceLoader resourceLoader, SEWeldDiscovery discovery)
+ * scanner.setURLHandler("bundle", new MyOSGiURLHandler(bundleClassLoader));
* }
* }
* </code>
*/
- public void configureClassHandlers(URLScanner scanner, ResourceLoader resourceLoader, SEWeldDiscovery discovery)
+ public void configureURLHandlers(URLScanner scanner, ResourceLoader resourceLoader, SEWeldDiscovery discovery)
{
}
Modified: java-se/trunk/src/main/java/org/jboss/weld/environment/se/discovery/URLScanner.java
===================================================================
--- java-se/trunk/src/main/java/org/jboss/weld/environment/se/discovery/URLScanner.java 2010-05-17 13:18:43 UTC (rev 6235)
+++ java-se/trunk/src/main/java/org/jboss/weld/environment/se/discovery/URLScanner.java 2010-05-17 13:25:37 UTC (rev 6236)
@@ -49,20 +49,20 @@
private static final String FILE = "file";
private static final String JAR = "jar";
- private final Map<String, URLHandler> classHandlers = new HashMap<String, URLHandler>();
+ private final Map<String, URLHandler> urlHandlers = new HashMap<String, URLHandler>();
private static final Logger log = LoggerFactory.getLogger(URLScanner.class);
public URLScanner(ResourceLoader resourceLoader, SEWeldDiscovery weldDiscovery)
{
super(resourceLoader, weldDiscovery);
URLHandler fileSysHandler = new FileSystemURLHandler(resourceLoader, weldDiscovery);
- classHandlers.put(FILE, fileSysHandler);
- classHandlers.put(JAR, fileSysHandler);
+ urlHandlers.put(FILE, fileSysHandler);
+ urlHandlers.put(JAR, fileSysHandler);
}
- public void setClassHandler(String type, URLHandler handler)
+ public void setURLHandler(String type, URLHandler handler)
{
- classHandlers.put(type, handler);
+ urlHandlers.put(type, handler);
}
public void scanDirectories(File[] directories)
@@ -70,7 +70,7 @@
for (File directory : directories)
{
// can only use a file-based scanner to scan directories
- classHandlers.get(FILE).handleDirectory(directory);
+ urlHandlers.get(FILE).handleDirectory(directory);
}
}
@@ -118,7 +118,7 @@
for (String urlType : paths.keySet())
{
Collection<String> urlPaths = paths.get(urlType);
- URLHandler handler = classHandlers.get(urlType);
+ URLHandler handler = urlHandlers.get(urlType);
if (handler == null)
{
throw new ClasspathScanningException("No handler defined for URL type: " + urlType);
More information about the weld-commits
mailing list