org.jboss.seam.deployment
Class AbstractScanner

java.lang.Object
  extended by org.jboss.seam.deployment.AbstractScanner
All Implemented Interfaces:
Scanner
Direct Known Subclasses:
ForwardingAbstractScanner, URLScanner

public abstract class AbstractScanner
extends Object
implements Scanner

Abstract base class for Scanner providing common functionality This class provides file-system orientated scanning

Author:
Pete Muir

Field Summary
protected  javax.servlet.ServletContext servletContext
           
 
Constructor Summary
protected AbstractScanner()
          Deprecated. 
  AbstractScanner(DeploymentStrategy deploymentStrategy)
           
protected AbstractScanner(javax.servlet.ServletContext servletContext)
           
 
Method Summary
 DeploymentStrategy getDeploymentStrategy()
          Get the deployment strategy this scanner is used by
 long getTimestamp()
           
protected  boolean handle(String name)
           
protected  void handleItem(String name)
           
protected static boolean hasAnnotations(javassist.bytecode.ClassFile classFile, Set<Class<? extends Annotation>> annotationTypes)
           
protected static javassist.bytecode.ClassFile loadClassFile(String name, ClassLoader classLoader)
          Get a Javassist ClassFile for a given class name from the classLoader
 void scanDirectories(File[] directories, File[] excludedDirectories)
          Recursively scan directories, skipping directories in the exclusion list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.seam.deployment.Scanner
scanDirectories, scanResources
 

Field Detail

servletContext

protected javax.servlet.ServletContext servletContext
Constructor Detail

AbstractScanner

public AbstractScanner(DeploymentStrategy deploymentStrategy)

AbstractScanner

@Deprecated
protected AbstractScanner()
Deprecated. 


AbstractScanner

protected AbstractScanner(javax.servlet.ServletContext servletContext)
Method Detail

hasAnnotations

protected static boolean hasAnnotations(javassist.bytecode.ClassFile classFile,
                                        Set<Class<? extends Annotation>> annotationTypes)

loadClassFile

protected static javassist.bytecode.ClassFile loadClassFile(String name,
                                                            ClassLoader classLoader)
                                                     throws IOException
Get a Javassist ClassFile for a given class name from the classLoader

Throws:
IOException

getDeploymentStrategy

public DeploymentStrategy getDeploymentStrategy()
Description copied from interface: Scanner
Get the deployment strategy this scanner is used by

Specified by:
getDeploymentStrategy in interface Scanner

getTimestamp

public long getTimestamp()
Specified by:
getTimestamp in interface Scanner

handleItem

protected void handleItem(String name)

handle

protected boolean handle(String name)

scanDirectories

public void scanDirectories(File[] directories,
                            File[] excludedDirectories)
Description copied from interface: Scanner
Recursively scan directories, skipping directories in the exclusion list.

Specified by:
scanDirectories in interface Scanner
Parameters:
directories - An array of the roots of the directory trees to scan
excludedDirectories - Directories to skip over during the recursive scan