org.eigenbase.resgen
Class FileTask

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

abstract class FileTask
extends java.lang.Object

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

Since:
19 September, 2005
Version:
$Id: //open/util/resgen/src/org/eigenbase/resgen/FileTask.java#4 $
Author:
jhyde

Field Summary
(package private)  java.lang.String className
           
(package private)  java.lang.String cppClassName
           
(package private)  java.lang.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, java.io.File file)
           
protected  void configureCommentStyle(Generator gen)
           
(package private)  void generateJava(ResourceGen generator, ResourceDef.ResourceBundle resourceList, java.util.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.
(package private)  java.io.File getDestDirectory()
          Returns the directory to which to generate Java or C++ files.
(package private)  java.io.File getFile()
          Returns the XML source file, e.g. happy/BirthdayResource_en.xml.
(package private)  java.lang.String getFileForComments()
          Returns the XML source file, mangled for use in comments.
(package private)  java.io.File getResourceDirectory()
          Returns the directory to which to generate .properties and .xml files.
(package private)  java.io.File getSrcDirectory()
          Returns the directory from which to read source files.
(package private)  void makeParentDirs(java.io.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

java.lang.String className

fileName

java.lang.String fileName

cppClassName

java.lang.String cppClassName

outputJava

boolean outputJava

outputCpp

boolean outputCpp
Constructor Detail

FileTask

FileTask()
Method Detail

process

abstract void process(ResourceGen generator)
               throws java.io.IOException
Throws:
java.io.IOException

getFile

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


getFileForComments

java.lang.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,
                      java.io.File file)

makeParentDirs

void makeParentDirs(java.io.File file)

getSrcDirectory

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


getDestDirectory

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


getResourceDirectory

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


generateJava

void generateJava(ResourceGen generator,
                  ResourceDef.ResourceBundle resourceList,
                  java.util.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