net.sf.jelly.apt.strategies
Class FileStrategy<B extends TemplateBlock>

java.lang.Object
  extended by net.sf.jelly.apt.strategies.TemplateStrategyControl<B>
      extended by net.sf.jelly.apt.strategies.TemplateBlockStrategy<B>
          extended by net.sf.jelly.apt.strategies.TemplateOutputRedirectionStrategy<B>
              extended by net.sf.jelly.apt.strategies.FileStrategy<B>
All Implemented Interfaces:
TemplateStrategy<B>

public class FileStrategy<B extends TemplateBlock>
extends TemplateOutputRedirectionStrategy<B>

Strategy for getting the output to a new file relative to the output directory specified for APT.

Author:
Ryan Heaton

Constructor Summary
FileStrategy()
           
 
Method Summary
protected  com.sun.mirror.apt.AnnotationProcessorEnvironment getAnnotationProcessorEnvironment()
          The current annotation processor environment.
 java.lang.String getCharset()
          The name of the charset to use.
 java.lang.String getName()
          The name of the file.
 java.lang.String getPackage()
          Package relative to which the file should be named, or the empty string if none.
 java.io.PrintWriter getWriter()
          Return the writer to the specified file.
 void setCharset(java.lang.String charset)
          The name of the charset to use.
 void setName(java.lang.String name)
          The name of the file.
 void setPackage(java.lang.String pkg)
          Package relative to which the file should be named, or the empty string if none.
 
Methods inherited from class net.sf.jelly.apt.strategies.TemplateOutputRedirectionStrategy
postProcess, preProcess
 
Methods inherited from class net.sf.jelly.apt.strategies.TemplateBlockStrategy
processBody
 
Methods inherited from class net.sf.jelly.apt.strategies.TemplateStrategyControl
invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileStrategy

public FileStrategy()
Method Detail

getWriter

public java.io.PrintWriter getWriter()
                              throws java.io.IOException,
                                     MissingParameterException
Return the writer to the specified file.

Specified by:
getWriter in class TemplateOutputRedirectionStrategy<B extends TemplateBlock>
Returns:
The writer to the specified file.
Throws:
java.io.IOException
MissingParameterException

getAnnotationProcessorEnvironment

protected com.sun.mirror.apt.AnnotationProcessorEnvironment getAnnotationProcessorEnvironment()
The current annotation processor environment.

Returns:
The current annotation processor environment.

getName

public java.lang.String getName()
The name of the file.

Returns:
The name of the file.

setName

public void setName(java.lang.String name)
The name of the file.

Parameters:
name - The name of the file.

getPackage

public java.lang.String getPackage()
Package relative to which the file should be named, or the empty string if none.

Returns:
Package relative to which the file should be named, or the empty string if none.

setPackage

public void setPackage(java.lang.String pkg)
Package relative to which the file should be named, or the empty string if none.

Parameters:
pkg - Package relative to which the file should be named, or the empty string if none.

getCharset

public java.lang.String getCharset()
The name of the charset to use.

Returns:
The name of the charset to use.

setCharset

public void setCharset(java.lang.String charset)
The name of the charset to use.

Parameters:
charset - The name of the charset to use.