com.sun.tools.xjc

Class XJC2Task

public class XJC2Task extends Task

XJC task for Ant. See the accompanied document for the usage.
Field Summary
Optionsoptions
Constructor Summary
XJC2Task()
Method Summary
voidaddConfiguredBinding(FileSet fs)
Nested <binding> element.
voidaddConfiguredDepends(FileSet fs)
Nested <depends> element.
voidaddConfiguredProduces(FileSet fs)
Nested <produces> element.
voidaddConfiguredSchema(FileSet fs)
Nested <schema> element.
voidaddConfiguredXMLCatalog(XMLCatalog xmlCatalog)
Add the catalog to our internal catalog
ArgumentcreateArg()
PathcreateClasspath()
Nested <classpath> element.
voidexecute()
Runs XJC.
voidsetBinding(String binding)
External binding file.
voidsetCatalog(File catalog)
Adds a new catalog file.
voidsetClasspath(Path cp)
Nested <classpath> element.
voidsetClasspathRef(Reference r)
voidsetDestdir(File dir)
Sets the directory to produce generated source files.
voidsetExtension(boolean flg)
Controls whether the compiler will run in the strict conformance mode (flg=false) or the extension mode (flg=true)
voidsetFailonerror(boolean value)
Mostly for our SQE teams and not to be advertized.
voidsetHeader(boolean flg)
Controls whether the file header comment is generated or not.
voidsetLanguage(String language)
Sets the schema language.
voidsetPackage(String pkg)
Sets the package name of the generated code.
voidsetReadonly(boolean flg)
Controls whether files should be generated in read-only mode or not
voidsetRemoveOldOutput(boolean roo)
"removeOldOutput" attribute.
voidsetSchema(String schema)
Parses the schema attribute.
voidsetStackSize(String ss)
Sets the stack size of the XJC invocation.
voidsetTarget(String version)
Sets the target version of the compilation
voidsetXexplicitAnnotation(boolean flg)

Field Detail

options

public final Options options

Constructor Detail

XJC2Task

public XJC2Task()

Method Detail

addConfiguredBinding

public void addConfiguredBinding(FileSet fs)
Nested <binding> element.

addConfiguredDepends

public void addConfiguredDepends(FileSet fs)
Nested <depends> element.

addConfiguredProduces

public void addConfiguredProduces(FileSet fs)
Nested <produces> element.

addConfiguredSchema

public void addConfiguredSchema(FileSet fs)
Nested <schema> element.

addConfiguredXMLCatalog

public void addConfiguredXMLCatalog(XMLCatalog xmlCatalog)
Add the catalog to our internal catalog

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

createArg

public Argument createArg()

createClasspath

public Path createClasspath()
Nested <classpath> element.

execute

void execute()
Runs XJC.

setBinding

public void setBinding(String binding)
External binding file.

setCatalog

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

setClasspath

public void setClasspath(Path cp)
Nested <classpath> element.

setClasspathRef

public void setClasspathRef(Reference r)

setDestdir

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

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)

setFailonerror

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

setHeader

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

setLanguage

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

setPackage

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

setReadonly

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

setRemoveOldOutput

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

setSchema

public void setSchema(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).

setStackSize

public void setStackSize(String ss)

Deprecated: not much need for JAXB2, as we now use much less stack.

Sets the stack size of the XJC invocation.

setTarget

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

setXexplicitAnnotation

public void setXexplicitAnnotation(boolean flg)

See Also: runtime14