|
Version: 0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.apache.tools.ant.taskdefs.optional.javarec.RecordTask
Generate a record class from a record type class.
This Ant task calls the Generator
command to
create Record
classes from RecordType
classes. There are no nested tags for this task, only
attributes.
Attribute | Description | Required |
---|---|---|
targetDir | The directory into which record source will be generated. | Yes |
pkgName | The package in which to place the record class. | Yes |
className | The name of the record class. | Yes |
outputType |
| No |
layout | The access mode of the record.
| No |
style |
| No |
namingScheme | Only used when layout = "2" or "3"
| No |
j2ee | Generate J2EE style record (implements
javax.resource.cci.Streamable ).
Default = "no".
| No |
recAttrType | Record Attribute Type. Default = com.ibm.ivj.eab.record.cobol.CobolRecordAttributes. | No |
genPrimArrTypes | Whether to generate accessors using primitive Java types or their corresponding object wrappers. Default is false, to not generate primitive type accessors. | No |
Field Summary | |
static java.lang.String |
DEFAULT_REC_ATTR_TYPE
Default record attribute type - currently set to "com.ibm.ivj.eab.record.cobol.CobolRecordAttributes"; |
static java.lang.String |
RECORD_GENERATOR
The name of the program that generates record source - currently set to com.ibm.ivj.eab.record.generator.codegen.Generator. |
Constructor Summary | |
RecordTask()
|
Method Summary | |
org.apache.tools.ant.types.Path |
createClasspath()
Create a Path object to be populated with
path elements. |
void |
execute()
Execute an EAB command RECORD_GENERATOR to generate
a record type class. |
org.apache.tools.ant.types.Path |
getClasspath()
Return a reference to this object's classpath element. |
void |
setClassName(java.lang.String name)
Set the class name of the record to be generated. |
void |
setClasspath(org.apache.tools.ant.types.Path src)
Set the classpath for finding dependent record type classes. |
void |
setClasspathRef(org.apache.tools.ant.types.Reference ref)
Add a reference to another classpath element. |
void |
setGenPrimArrTypes(boolean type)
Generate accessors that return primitive data types. |
void |
setJ2ee(boolean j2ee)
Determine whether to generate J2EE style records or CCF style records. |
void |
setLayout(java.lang.String layout)
Set the record layout for record generation. |
void |
setNamingScheme(java.lang.String scheme)
Determine whether short or long names are to be used for attributes. |
void |
setOutputType(java.lang.String type)
Set the output type for the record generation. |
void |
setPkgName(java.lang.String name)
Set the package name of the record to be generated. |
void |
setRecAttrType(java.lang.String type)
Set the name of the record type attribute class used by the generated record class. |
void |
setRecType(java.lang.String type)
Set the fully-qualified class name of the record type class used to generate the record class. |
void |
setStyle(java.lang.String style)
Determine whether notification support is incorporated into the generated record. |
void |
setTargetDir(java.io.File dir)
Set the target directory in which the record package heirarchy will be generated. |
Field Detail |
public static final java.lang.String DEFAULT_REC_ATTR_TYPE
public static final java.lang.String RECORD_GENERATOR
Constructor Detail |
public RecordTask()
Method Detail |
public void setTargetDir(java.io.File dir)
public void setPkgName(java.lang.String name)
public void setClassName(java.lang.String name)
public void setRecType(java.lang.String type)
public void setOutputType(java.lang.String type)
type
- the record typepublic void setLayout(java.lang.String layout)
layout
- the layoutpublic void setStyle(java.lang.String style)
style
- the stylepublic void setRecAttrType(java.lang.String type)
DEFAULT_REC_ATTR_TYPE
.
type
- the attribute typepublic void setNamingScheme(java.lang.String scheme)
scheme
- the naming schemepublic void setJ2ee(boolean j2ee)
javax.resource.cci.Streamable
interface.
j2ee
- use j2ee style records if set to truepublic void setGenPrimArrTypes(boolean type)
type
- accessor return typepublic void setClasspath(org.apache.tools.ant.types.Path src)
src
- - the path to addpublic org.apache.tools.ant.types.Path createClasspath()
Path
object to be populated with
path elements.
public org.apache.tools.ant.types.Path getClasspath()
public void setClasspathRef(org.apache.tools.ant.types.Reference ref)
ref
- a reference to another Path instancepublic void execute() throws org.apache.tools.ant.BuildException
RECORD_GENERATOR
to generate
a record type class. The command is forked rather than run
in the same JVM since some EAB commands have exit
coded in their main method.
|
Version: 0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |