com.sun.enterprise.deployment.annotation.impl
Class ModuleScanner<T>

java.lang.Object
  extended by org.glassfish.apf.impl.JavaEEScanner
      extended by com.sun.enterprise.deployment.annotation.impl.ModuleScanner<T>
All Implemented Interfaces:
Scanner<T>
Direct Known Subclasses:
AppClientScanner, EjbJarScanner, RarScanner, WarScanner

public abstract class ModuleScanner<T>
extends JavaEEScanner
implements Scanner<T>

This is an abstract class of the Scanner interface for J2EE module.

Author:
Shing Wai Chan

Field Summary
protected  java.io.File archiveFile
           
protected  java.lang.ClassLoader classLoader
           
protected  org.glassfish.hk2.classmodel.reflect.Parser classParser
           
protected  java.util.logging.Logger logger
           
 
Constructor Summary
ModuleScanner()
           
 
Method Summary
protected  void addLibraryJars(T bundleDesc, ReadableArchive moduleArchive)
           
protected  void addScanClassName(java.lang.String className)
          This add extra className to be scanned.
protected  void addScanDirectory(java.io.File directory)
          This will include all class in directory to be scanned.
protected  void addScanJar(java.io.File jarFile)
          This add all classes in given jarFile to be scanned.
protected  void addScanURI(java.net.URI jarURI)
          This add all classes in given jarFile to be scanned.
protected  void calculateResults()
           
protected  void completeProcess(T bundleDescr, ReadableArchive archive)
          Performs all additional work after the "process" method has finished.
 java.lang.ClassLoader getClassLoader()
           
 java.util.Set<java.lang.Class> getElements()
           
protected  java.util.concurrent.ExecutorService getExecutorService()
           
 org.glassfish.hk2.classmodel.reflect.Types getTypes()
           
 void process(ReadableArchive archiveFile, T bundleDesc, java.lang.ClassLoader classLoader, org.glassfish.hk2.classmodel.reflect.Parser parser)
           
protected  void setParser(org.glassfish.hk2.classmodel.reflect.Parser parser)
           
 
Methods inherited from class org.glassfish.apf.impl.JavaEEScanner
getComponentInfo, 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, process
 

Field Detail

archiveFile

protected java.io.File archiveFile

classLoader

protected java.lang.ClassLoader classLoader

classParser

protected org.glassfish.hk2.classmodel.reflect.Parser classParser

logger

protected java.util.logging.Logger logger
Constructor Detail

ModuleScanner

public ModuleScanner()
Method Detail

process

public void process(ReadableArchive archiveFile,
                    T bundleDesc,
                    java.lang.ClassLoader classLoader,
                    org.glassfish.hk2.classmodel.reflect.Parser parser)
             throws java.io.IOException
Throws:
java.io.IOException

completeProcess

protected void completeProcess(T bundleDescr,
                               ReadableArchive archive)
                        throws java.io.IOException
Performs all additional work after the "process" method has finished.

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.

Parameters:
bundleDescr -
archive -
Throws:
java.io.IOException

calculateResults

protected void calculateResults()

addScanClassName

protected void addScanClassName(java.lang.String className)
This add extra className to be scanned.

Parameters:
className -

addScanJar

protected void addScanJar(java.io.File jarFile)
                   throws java.io.IOException
This add all classes in given jarFile to be scanned.

Parameters:
jarFile -
Throws:
java.io.IOException

addScanURI

protected void addScanURI(java.net.URI jarURI)
                   throws java.io.IOException
This add all classes in given jarFile to be scanned.

Parameters:
jarURI -
Throws:
java.io.IOException

addScanDirectory

protected void addScanDirectory(java.io.File directory)
                         throws java.io.IOException
This will include all class in directory to be scanned. param directory

Throws:
java.io.IOException

getClassLoader

public java.lang.ClassLoader getClassLoader()
Specified by:
getClassLoader in interface Scanner<T>

getElements

public java.util.Set<java.lang.Class> getElements()
Specified by:
getElements in interface Scanner<T>

addLibraryJars

protected void addLibraryJars(T bundleDesc,
                              ReadableArchive moduleArchive)
                       throws java.io.IOException
Throws:
java.io.IOException

getTypes

public org.glassfish.hk2.classmodel.reflect.Types getTypes()
Specified by:
getTypes in interface Scanner<T>
Overrides:
getTypes in class JavaEEScanner

getExecutorService

protected java.util.concurrent.ExecutorService getExecutorService()

setParser

protected void setParser(org.glassfish.hk2.classmodel.reflect.Parser parser)


Copyright © 2012 GlassFish Community. All Rights Reserved.