Class 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 Detail

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