Class FileTask

java.lang.Object
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
Version:
$Id: //open/util/resgen/src/org/eigenbase/resgen/FileTask.java#4 $
Author:
jhyde
  • Field Details

  • Constructor Details

    • FileTask

      FileTask()
  • Method Details

    • 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)