public class RccTask
extends org.apache.tools.ant.Task
This task takes the given record definition files and compiles them into java or c++ files. It is then up to the user to compile the generated files.
The task requires the file
or the nested fileset element to be
specified. Optional attributes are language
(set the output
language, default is "java"),
destdir
(name of the destination directory for generated java/c++
code, default is ".") and failonerror
(specifies error handling
behavior. default is true).
<recordcc destdir="${basedir}/gensrc" language="java"> <fileset include="**\/*.jr" /> </recordcc>
构造器和说明 |
---|
RccTask()
Creates a new instance of RccTask
|
限定符和类型 | 方法和说明 |
---|---|
void |
addFileset(org.apache.tools.ant.types.FileSet set)
Adds a fileset that can consist of one or more files
|
void |
execute()
Invoke the Hadoop record compiler on each record definition file
|
void |
setDestdir(File dir)
Sets directory where output files will be generated
|
void |
setFailonerror(boolean flag)
Given multiple files (via fileset), set the error handling behavior
|
void |
setFile(File file)
Sets the record definition file attribute
|
void |
setLanguage(String language)
Sets the output language option
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public void setLanguage(String language)
language
- "java"/"c++"public void setFile(File file)
file
- record definition filepublic void setFailonerror(boolean flag)
flag
- true will throw build exception in case of failure (default)public void setDestdir(File dir)
dir
- output directorypublic void addFileset(org.apache.tools.ant.types.FileSet set)
set
- Set of record definition filespublic void execute() throws org.apache.tools.ant.BuildException
execute
在类中 org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
Copyright © 2009 The Apache Software Foundation