Package org.glassfish.apf.impl
Class DirectoryScanner
- java.lang.Object
-
- org.glassfish.apf.impl.JavaEEScanner
-
- org.glassfish.apf.impl.DirectoryScanner
-
public class DirectoryScanner extends JavaEEScanner implements Scanner<Object>
Implementation of the Scanner interface for a directory- Author:
- Jerome Dochez
-
-
Constructor Summary
Constructors Constructor Description DirectoryScanner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoader
getClassLoader()
Returns a ClassLoader capable of loading classes from the underlying mediumSet<Class>
getElements()
Return a complete set of classes available from this location.Set<Class>
getElements(Set<String> classNames)
Return a class instance available from this location from class name.protected Set<String>
getEntries()
void
process(File directory, Object bundleDesc, ClassLoader classLoader)
Scan the archive file and gather a list of classes that should be processed for annotations-
Methods inherited from class org.glassfish.apf.impl.JavaEEScanner
getComponentInfo, getTypes, initTypes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.glassfish.apf.Scanner
getComponentInfo, getTypes
-
-
-
-
Method Detail
-
process
public void process(File directory, Object bundleDesc, ClassLoader classLoader) throws IOException
Description copied from interface:Scanner
Scan the archive file and gather a list of classes that should be processed for annotations- Specified by:
process
in interfaceScanner<Object>
- Parameters:
directory
- the archive file for scanningbundleDesc
- the bundle descriptor associated with this archiveclassLoader
- the classloader used to scan the annotation- Throws:
IOException
-
getClassLoader
public ClassLoader getClassLoader()
Description copied from interface:Scanner
Returns a ClassLoader capable of loading classes from the underlying medium- Specified by:
getClassLoader
in interfaceScanner<Object>
- Returns:
- a class loader capable of loading the classes
-
getElements
public Set<Class> getElements()
Description copied from interface:Scanner
Return a complete set of classes available from this location.- Specified by:
getElements
in interfaceScanner<Object>
- Returns:
- the complete set of classes
-
getElements
public Set<Class> getElements(Set<String> classNames)
Description copied from interface:Scanner
Return a class instance available from this location from class name.- Specified by:
getElements
in interfaceScanner<Object>
- Parameters:
classNames
- the list of class name- Returns:
- the set of classes for given names
-
-