|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTask
org.eigenbase.xom.XOMGenTask
public class XOMGenTask
XOMGenTask
is an ANT task with which to invoke MetaGenerator
.
Invokes the MetaGenerator
.
This task only invokes XOMGen if the grammar file is newer than the generated Java files.
Attribute | Description | Required |
model | The name of the XML file which holds the XOM model. | Yes |
destdir | The name of the output directory. Default is the current directory. | No |
classname | The full name of the class to generate. | Yes |
dtdname | The name of the DTD file to generate. The path may be
either absolute, or relative to destdir . |
Yes |
<xomgen model="src/org/eigenbase/xom/Meta.xml" destdir="src" classname="org.eigenbase.xom.MetaDef"/>
This invokes XOMGen on the model file
src/org/eigenbase/xom/Meta.xml
, and generates
src/org/eigenbase/xom/MetaDef.java
and
src/org/eigenbase/xom/meta.dtd
.
Field Summary | |
---|---|
(package private) String |
className
|
(package private) String |
destDir
|
(package private) String |
dtdFileName
|
(package private) String |
modelFileName
|
Constructor Summary | |
---|---|
XOMGenTask()
|
Method Summary | |
---|---|
(package private) static File |
classNameToFile(File dir,
String className)
Creates the File that a java class will live in. |
void |
execute()
|
void |
setClassname(String classname)
See parameter classname . |
void |
setDestdir(String destdir)
See parameter destdir . |
void |
setDtdname(String dtdname)
See parameter dtdname . |
void |
setModel(String model)
See parameter model . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
String modelFileName
String destDir
String dtdFileName
String className
Constructor Detail |
---|
public XOMGenTask()
Method Detail |
---|
public void execute() throws BuildException
BuildException
public void setModel(String model)
model
.
public void setDestdir(String destdir)
destdir
.
public void setClassname(String classname)
classname
.
public void setDtdname(String dtdname)
dtdname
.
static File classNameToFile(File dir, String className)
makeJavaFileName("com.myproj", "MyClass")
returns
"com/myproj/MyClass.java".
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |