org.objectweb.easybeans.deployment.annotations.analyzer
Class AnnotationDeploymentAnalyzer

java.lang.Object
  extended by org.objectweb.easybeans.deployment.annotations.analyzer.AnnotationDeploymentAnalyzer

public class AnnotationDeploymentAnalyzer
extends java.lang.Object

This class finds the annotated class and fill metadata class.

Author:
Florent Benoit

Field Summary
private  java.io.File archive
          Archive which will be analyzed.
private  EjbJarAnnotationMetadata ejbJarAnnotationMetadata
          Metadata representing the parsed ejb-jar file.
private static JLog logger
          Logger.
private  ScanClassVisitor scanVisitor
          ASM visitor used to visit classes.
 
Constructor Summary
AnnotationDeploymentAnalyzer(java.io.File archive)
          Constructor.
Archive which will be used when analyzing.
 
Method Summary
 void analyze()
          Analyzes the archive and fill metadata struct.
 EjbJarAnnotationMetadata getEjbJarAnnotationMetadata()
           
private  void scanDirectory(java.io.File directory)
          Scan (recursively) all classes from the given directory.
private  void scanJarArchive()
          Scan all classes from the archive which is a jar file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

archive

private java.io.File archive
Archive which will be analyzed.


ejbJarAnnotationMetadata

private EjbJarAnnotationMetadata ejbJarAnnotationMetadata
Metadata representing the parsed ejb-jar file.


logger

private static JLog logger
Logger.


scanVisitor

private ScanClassVisitor scanVisitor
ASM visitor used to visit classes.

Constructor Detail

AnnotationDeploymentAnalyzer

public AnnotationDeploymentAnalyzer(java.io.File archive)
Constructor.
Archive which will be used when analyzing.

Parameters:
archive - the archive to analyze.
Method Detail

analyze

public void analyze()
             throws AnalyzerException
Analyzes the archive and fill metadata struct.

Throws:
AnalyzerException - if analyze of archive fails

scanJarArchive

private void scanJarArchive()
                     throws AnalyzerException
Scan all classes from the archive which is a jar file.

Throws:
AnalyzerException - if scan is aborted.

scanDirectory

private void scanDirectory(java.io.File directory)
                    throws AnalyzerException
Scan (recursively) all classes from the given directory. It starts with the archive root directory first.

Parameters:
directory - the directory in which proceed all classes.
Throws:
AnalyzerException - if analyzer fails to scan classes.

getEjbJarAnnotationMetadata

public EjbJarAnnotationMetadata getEjbJarAnnotationMetadata()
Returns:
struct (metadata) filled by this analyzer