org.eigenbase.resgen
Class FileTask

java.lang.Object
  extended by org.eigenbase.resgen.FileTask
Direct Known Subclasses:
PropertiesFileTask, XmlFileTask

abstract class FileTask
extends Object

Abstract base class for an Ant task which processes a file containing resources.

Since:
19 September, 2005
Author:
jhyde
 

Field Summary
(package private)  String className
           
(package private)  String cppClassName
           
(package private)  String fileName
           
(package private)  ResourceGenTask.Include include
           
(package private)  boolean outputCpp
           
(package private)  boolean outputJava
           
 
Constructor Summary
FileTask()
           
 
Method Summary
(package private)  boolean checkUpToDate(ResourceGen generator, File file)
           
protected  void configureCommentStyle(Generator gen)
           
(package private)  void generateJava(ResourceGen generator, ResourceDef.ResourceBundle resourceList, Locale locale)
          Generates a Java class, e.g.
(package private)  File getDestDirectory()
          Returns the directory to which to generate Java or C++ files.
(package private)  File getFile()
          Returns the XML source file, e.g.
(package private)  String getFileForComments()
          Returns the XML source file, mangled for use in comments.
(package private)  File getResourceDirectory()
          Returns the directory to which to generate .properties and .xml files.
(package private)  File getSrcDirectory()
          Returns the directory from which to read source files.
(package private)  void makeParentDirs(File file)
           
(package private) abstract  void process(ResourceGen generator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

include

ResourceGenTask.Include include

className

String className

fileName

String fileName

cppClassName

String cppClassName

outputJava

boolean outputJava

outputCpp

boolean outputCpp
Constructor Detail

FileTask

FileTask()
Method Detail

process

abstract void process(ResourceGen generator)
               throws IOException
Throws:
IOException

getFile

File getFile()
Returns the XML source file, e.g. happy/BirthdayResource_en.xml.


getFileForComments

String getFileForComments()
Returns the XML source file, mangled for use in comments. e.g. .../BirthdayResource_en.xml if SCM-safe comments are enabled.


checkUpToDate

boolean checkUpToDate(ResourceGen generator,
                      File file)

makeParentDirs

void makeParentDirs(File file)

getSrcDirectory

File getSrcDirectory()
Returns the directory from which to read source files.


getDestDirectory

File getDestDirectory()
Returns the directory to which to generate Java or C++ files.


getResourceDirectory

File getResourceDirectory()
Returns the directory to which to generate .properties and .xml files.


generateJava

void generateJava(ResourceGen generator,
                  ResourceDef.ResourceBundle resourceList,
                  Locale locale)
Generates a Java class, e.g. com/foo/MyResource.java or com/foo/MyResource_en_US.java, depending upon whether locale is null.


configureCommentStyle

protected void configureCommentStyle(Generator gen)

SourceForge.net_Logo