public abstract class ModuleScanner<T> extends JavaEEScanner implements Scanner<T>
| Modifier and Type | Field and Description |
|---|---|
protected File |
archiveFile |
protected ClassLoader |
classLoader |
protected org.glassfish.hk2.classmodel.reflect.Parser |
classParser |
static Logger |
deplLogger |
| Constructor and Description |
|---|
ModuleScanner() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLibraryJars(T bundleDesc,
ReadableArchive moduleArchive) |
protected void |
addScanClassName(String className)
This add extra className to be scanned.
|
protected void |
addScanDirectory(File directory)
This will include all class in directory to be scanned.
|
protected void |
addScanJar(File jarFile)
This add all classes in given jarFile to be scanned.
|
protected void |
addScanURI(URI jarURI)
This add all classes in given jarFile to be scanned.
|
protected void |
calculateResults(T bundleDesc) |
protected void |
completeProcess(T bundleDescr,
ReadableArchive archive)
Performs all additional work after the "process" method has finished.
|
ClassLoader |
getClassLoader()
Returns a ClassLoader capable of loading classes from the
underlying medium
|
Set<Class> |
getElements()
Return a complete set of classes available from this location.
|
protected ExecutorService |
getExecutorService() |
org.glassfish.hk2.classmodel.reflect.Types |
getTypes()
Return the types information for this module
|
void |
process(ReadableArchive archiveFile,
T bundleDesc,
ClassLoader classLoader,
org.glassfish.hk2.classmodel.reflect.Parser parser) |
protected void |
setParser(org.glassfish.hk2.classmodel.reflect.Parser parser) |
getComponentInfo, initTypesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComponentInfo, processprotected File archiveFile
protected ClassLoader classLoader
protected org.glassfish.hk2.classmodel.reflect.Parser classParser
public static final Logger deplLogger
public void process(ReadableArchive archiveFile, T bundleDesc, ClassLoader classLoader, org.glassfish.hk2.classmodel.reflect.Parser parser) throws IOException
IOExceptionprotected void completeProcess(T bundleDescr, ReadableArchive archive) throws IOException
This is a separate method from "process" so that the app client scanner can invoke it from its overriding process method. All post-processing logic needs to be collected in this one place.
bundleDescr - archive - IOExceptionprotected void calculateResults(T bundleDesc)
protected void addScanClassName(String className)
className - protected void addScanJar(File jarFile) throws IOException
jarFile - IOExceptionprotected void addScanURI(URI jarURI) throws IOException
jarURI - IOExceptionprotected void addScanDirectory(File directory) throws IOException
directory - IOExceptionpublic ClassLoader getClassLoader()
ScannergetClassLoader in interface Scanner<T>public Set<Class> getElements()
ScannergetElements in interface Scanner<T>protected void addLibraryJars(T bundleDesc, ReadableArchive moduleArchive)
bundleDesc - moduleArchive - public org.glassfish.hk2.classmodel.reflect.Types getTypes()
ScannergetTypes in interface Scanner<T>getTypes in class JavaEEScannerprotected ExecutorService getExecutorService()
protected void setParser(org.glassfish.hk2.classmodel.reflect.Parser parser)
Copyright © 2017. All rights reserved.