com.opensymphony.xwork.apt
Class AbstractProcessor

java.lang.Object
  extended by com.opensymphony.xwork.apt.AbstractProcessor
All Implemented Interfaces:
com.sun.mirror.apt.AnnotationProcessor
Direct Known Subclasses:
ConversionProcessor

public abstract class AbstractProcessor
extends Object
implements com.sun.mirror.apt.AnnotationProcessor

AbstractProcessor

Version:
$Id: AbstractProcessor.java 860 2006-03-03 16:10:09 +0100 (Fri, 03 Mar 2006) rainerh $
Author:
Rainer Hermanns

Field Summary
protected  com.sun.mirror.apt.AnnotationProcessorEnvironment env
           
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
AbstractProcessor()
           
 
Method Summary
protected  PrintWriter getClassesMetaInfWriter(String filename)
          Returns a PrintWriter that writes to META-INF directory within the Filer.Location.CLASS_TREE.
protected  PrintWriter getSourceMetaInfWriter(String filename)
          Returns a PrintWriter that writes to META-INF directory within the Filer.Location.SOURCE_TREE.
protected  PrintWriter getWebInfWriter(String filename)
          Returns a PrintWriter that writes to WEB-INF directory within the Filer.Location.SOURCE_TREE.
 void init()
          Initializes all annotations types required for processing.
abstract  void process()
          Process all program elements supported by this annotations processor.
 void setEnv(com.sun.mirror.apt.AnnotationProcessorEnvironment env)
          Sets the AnnotationProcessorEnvironment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log

env

protected com.sun.mirror.apt.AnnotationProcessorEnvironment env
Constructor Detail

AbstractProcessor

public AbstractProcessor()
Method Detail

setEnv

public void setEnv(com.sun.mirror.apt.AnnotationProcessorEnvironment env)
Sets the AnnotationProcessorEnvironment.

Parameters:
env - the AnnotationProcessorEnvironment.

init

public void init()
Initializes all annotations types required for processing.


process

public abstract void process()
Process all program elements supported by this annotations processor.

Specified by:
process in interface com.sun.mirror.apt.AnnotationProcessor

getSourceMetaInfWriter

protected PrintWriter getSourceMetaInfWriter(String filename)
                                      throws IOException
Returns a PrintWriter that writes to META-INF directory within the Filer.Location.SOURCE_TREE.

Parameters:
filename - The filename of the file to be written.
Returns:
PrintWriter that writes to META-INF directory within the Filer.Location.SOURCE_TREE.
Throws:
IOException

getClassesMetaInfWriter

protected PrintWriter getClassesMetaInfWriter(String filename)
                                       throws IOException
Returns a PrintWriter that writes to META-INF directory within the Filer.Location.CLASS_TREE.

Parameters:
filename - The filename of the file to be written.
Returns:
PrintWriter that writes to META-INF directory within the Filer.Location.CLASS_TREE.
Throws:
IOException

getWebInfWriter

protected PrintWriter getWebInfWriter(String filename)
                               throws IOException
Returns a PrintWriter that writes to WEB-INF directory within the Filer.Location.SOURCE_TREE.

Parameters:
filename - The filename of the file to be written.
Returns:
PrintWriter that writes to WEB-INF directory within the Filer.Location.SOURCE_TREE.
Throws:
IOException

XWork Project Page