org.yajul.util
Class AbstractScanner
java.lang.Object
org.yajul.util.AbstractScanner
- Direct Known Subclasses:
- BasicScanner
public abstract class AbstractScanner
- extends java.lang.Object
Classpath scanner adapted from Seam. Finds a 'tag' resource in the classpath and then scans through
all the directories and files inside the JAR or directory where the tag resource was found. This can be used to
iterate through all the classes in a particular class path element to find all classes that implement a particular
interface, for example.
User: josh
Date: Mar 6, 2008
Time: 6:09:45 PM
- Author:
- Josh Davis - Adapted to Yajul., Thomas Heute, Gavin King, Norman Richards
Constructor Summary |
AbstractScanner(java.lang.String resourceName)
Scans everything in the classpath where the specified resource is located. |
AbstractScanner(java.lang.String resourceName,
java.lang.ClassLoader classLoader)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resourceName
protected java.lang.String resourceName
classLoader
protected java.lang.ClassLoader classLoader
AbstractScanner
public AbstractScanner(java.lang.String resourceName)
- Scans everything in the classpath where the specified resource is located.
- Parameters:
resourceName
- resource name used to find a directory or archive to scan
AbstractScanner
public AbstractScanner(java.lang.String resourceName,
java.lang.ClassLoader classLoader)
filenameToClassname
public static java.lang.String filenameToClassname(java.lang.String filename)
filenameToPackage
public static java.lang.String filenameToPackage(java.lang.String filename)
scan
protected void scan()
getURLsFromClassLoader
protected java.net.URL[] getURLsFromClassLoader()
Copyright © 2008. All Rights Reserved.