com.sun.tools.xjc
Class XJC2Task

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by com.sun.tools.xjc.XJC2Task

public class XJC2Task
extends org.apache.tools.ant.Task

XJC task for Ant. See the accompanied document for the usage.


Field Summary
 Options options
           
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
XJC2Task()
           
 
Method Summary
 void addConfiguredBinding(org.apache.tools.ant.types.FileSet fs)
          Nested <binding> element.
 void addConfiguredDepends(org.apache.tools.ant.types.FileSet fs)
          Nested <depends> element.
 void addConfiguredProduces(org.apache.tools.ant.types.FileSet fs)
          Nested <produces> element.
 void addConfiguredSchema(org.apache.tools.ant.types.FileSet fs)
          Nested <schema> element.
 void addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog xmlCatalog)
          Add the catalog to our internal catalog
 org.apache.tools.ant.types.Commandline.Argument createArg()
           
 org.apache.tools.ant.types.Path createClasspath()
          Nested <classpath> element.
 void execute()
          Runs XJC.
 void setBinding(java.lang.String binding)
          External binding file.
 void setCatalog(java.io.File catalog)
          Adds a new catalog file.
 void setClasspath(org.apache.tools.ant.types.Path cp)
          Nested <classpath> element.
 void setClasspathRef(org.apache.tools.ant.types.Reference r)
           
 void setDestdir(java.io.File dir)
          Sets the directory to produce generated source files.
 void setExtension(boolean flg)
          Controls whether the compiler will run in the strict conformance mode (flg=false) or the extension mode (flg=true)
 void setFailonerror(boolean value)
          Mostly for our SQE teams and not to be advertized.
 void setHeader(boolean flg)
          Controls whether the file header comment is generated or not.
 void setLanguage(java.lang.String language)
          Sets the schema language.
 void setPackage(java.lang.String pkg)
          Sets the package name of the generated code.
 void setReadonly(boolean flg)
          Controls whether files should be generated in read-only mode or not
 void setRemoveOldOutput(boolean roo)
          "removeOldOutput" attribute.
 void setSchema(java.lang.String schema)
          Parses the schema attribute.
 void setStackSize(java.lang.String ss)
          Deprecated. not much need for JAXB2, as we now use much less stack.
 void setTarget(java.lang.String version)
          Sets the target version of the compilation
 void setXexplicitAnnotation(boolean flg)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

public final Options options
Constructor Detail

XJC2Task

public XJC2Task()
Method Detail

setSchema

public void setSchema(java.lang.String schema)
Parses the schema attribute. This attribute will be used when there is only one schema.

Parameters:
schema - A file name (can be relative to base dir), or an URL (must be absolute).

addConfiguredSchema

public void addConfiguredSchema(org.apache.tools.ant.types.FileSet fs)
Nested <schema> element.


setClasspath

public void setClasspath(org.apache.tools.ant.types.Path cp)
Nested <classpath> element.


createClasspath

public org.apache.tools.ant.types.Path createClasspath()
Nested <classpath> element.


setClasspathRef

public void setClasspathRef(org.apache.tools.ant.types.Reference r)

setLanguage

public void setLanguage(java.lang.String language)
Sets the schema language.


setBinding

public void setBinding(java.lang.String binding)
External binding file.


addConfiguredBinding

public void addConfiguredBinding(org.apache.tools.ant.types.FileSet fs)
Nested <binding> element.


setPackage

public void setPackage(java.lang.String pkg)
Sets the package name of the generated code.


setCatalog

public void setCatalog(java.io.File catalog)
Adds a new catalog file.


setFailonerror

public void setFailonerror(boolean value)
Mostly for our SQE teams and not to be advertized.


setStackSize

public void setStackSize(java.lang.String ss)
Deprecated. not much need for JAXB2, as we now use much less stack.

Sets the stack size of the XJC invocation.


addConfiguredXMLCatalog

public void addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog xmlCatalog)
Add the catalog to our internal catalog

Parameters:
xmlCatalog - the XMLCatalog instance to use to look up DTDs

setReadonly

public void setReadonly(boolean flg)
Controls whether files should be generated in read-only mode or not


setHeader

public void setHeader(boolean flg)
Controls whether the file header comment is generated or not.


setXexplicitAnnotation

public void setXexplicitAnnotation(boolean flg)
See Also:
Options.runtime14

setExtension

public void setExtension(boolean flg)
Controls whether the compiler will run in the strict conformance mode (flg=false) or the extension mode (flg=true)


setTarget

public void setTarget(java.lang.String version)
Sets the target version of the compilation


setDestdir

public void setDestdir(java.io.File dir)
Sets the directory to produce generated source files.


addConfiguredDepends

public void addConfiguredDepends(org.apache.tools.ant.types.FileSet fs)
Nested <depends> element.


addConfiguredProduces

public void addConfiguredProduces(org.apache.tools.ant.types.FileSet fs)
Nested <produces> element.


setRemoveOldOutput

public void setRemoveOldOutput(boolean roo)
"removeOldOutput" attribute.


createArg

public org.apache.tools.ant.types.Commandline.Argument createArg()

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Runs XJC.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException