Package org.eigenbase.resgen

# 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 Summary

Fields
Modifier and Type
Field
Description
`(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

Constructors
Constructor
Description
`FileTask()`

## Method Summary

Modifier and Type
Method
Description
`(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 Details

### include

ResourceGenTask.Include include

### className

String className

### fileName

String fileName

### cppClassName

String cppClassName

### outputJava

boolean outputJava

### outputCpp

boolean outputCpp

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