Top Description Inners Fields Constructors Methods
com.sun.tools.xjc

public final Class Driver

extends Object
Class Inheritance
Imports
java.io.File, .FileOutputStream, .IOException, .OutputStream, .OutputStreamWriter, .PrintStream, java.security.AccessController, .PrivilegedAction, java.util.Iterator, .Map.Entry, com.sun.codemodel.CodeWriter, .JCodeModel, com.sun.codemodel.writer.ZipCodeWriter, com.sun.istack.NotNull, .Nullable, com.sun.istack.tools.DefaultAuthenticator, com.sun.tools.xjc.generator.bean.BeanGenerator, com.sun.tools.xjc.model.Model, com.sun.tools.xjc.outline.Outline, com.sun.tools.xjc.reader.gbind.Expression, .Graph, com.sun.tools.xjc.reader.internalizer.DOMForest, com.sun.tools.xjc.reader.xmlschema.ExpressionBuilder, com.sun.tools.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic, com.sun.tools.xjc.util.ErrorReceiverFilter, .NullStream, .Util, com.sun.tools.xjc.writer.SignatureWriter, com.sun.xml.xsom.XSComplexType, .XSParticle, .XSSchemaSet, org.xml.sax.SAXException, .SAXParseException

Command Line Interface of XJC.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum
Driver.Mode

Operation mode.

pack-priv static class
Driver.OptionsEx

Command-line arguments processor.

private static class
Driver.WeAreDone

Used to signal that we've finished processing.

Field Summary

Modifier and TypeField and Description
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
_main(String[] args)

public static String
public static void
main(final String[] args)

public static int

Returns:

If the compiler runs successfully, this method returns 0. All non-zero values indicate an error. The error message will be sent to the specified PrintStream.
run
(String[]
specified command line parameters. If there is an error in the parameters, BadCommandLineException will be thrown.
args
,
final PrintStream
Status report of the compilation will be sent to this object. Useful to update users so that they will know something is happening. Only ignorable messages should be sent to this stream. This parameter can be null to suppress messages.
status
,
final PrintStream
Various non-ignorable output (error messages, etc) will go to this stream.
out
)

Performs schema compilation and prints the status/error into the specified PrintStream.

public static int

Returns:

If the compiler runs successfully, this method returns 0. All non-zero values indicate an error. The error message will be sent to the specified PrintStream.
run
(String[]
specified command line parameters. If there is an error in the parameters, BadCommandLineException will be thrown.
args
,
final XJCListener
Receives messages from XJC reporting progress/errors.
listener
)

Performs schema compilation and prints the status/error into the specified PrintStream.

private static void
setupProxies()

Set useSystemProxies if needed

public static void
usage(Options
If the parsing of options have started, set a partly populated Options object.
opts
,
boolean privateUsage)

Prints the usage screen and exits the process.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SYSTEM_PROXY_PROPERTYback to summary
private static final String SYSTEM_PROXY_PROPERTY

Constructor Detail

Driverback to summary
private Driver()

Method Detail

_mainback to summary
private static void _main(String[] args) throws Exception
getBuildIDback to summary
public static String getBuildID()
mainback to summary
public static void main(final String[] args) throws Exception
runback to summary
public static int run(String[] args, final PrintStream status, final PrintStream out) throws Exception

Performs schema compilation and prints the status/error into the specified PrintStream.

This method could be used to trigger XJC from other tools, such as Ant or IDE.

Parameters
args:String[]

specified command line parameters. If there is an error in the parameters, BadCommandLineException will be thrown.

status:PrintStream

Status report of the compilation will be sent to this object. Useful to update users so that they will know something is happening. Only ignorable messages should be sent to this stream. This parameter can be null to suppress messages.

out:PrintStream

Various non-ignorable output (error messages, etc) will go to this stream.

Returns:int

If the compiler runs successfully, this method returns 0. All non-zero values indicate an error. The error message will be sent to the specified PrintStream.

runback to summary
public static int run(String[] args, final XJCListener listener) throws BadCommandLineException

Performs schema compilation and prints the status/error into the specified PrintStream.

This method could be used to trigger XJC from other tools, such as Ant or IDE.

Parameters
args:String[]

specified command line parameters. If there is an error in the parameters, BadCommandLineException will be thrown.

listener:XJCListener

Receives messages from XJC reporting progress/errors.

Returns:int

If the compiler runs successfully, this method returns 0. All non-zero values indicate an error. The error message will be sent to the specified PrintStream.

setupProxiesback to summary
private static void setupProxies()

Set useSystemProxies if needed

usageback to summary
public static void usage(Options opts, boolean privateUsage)

Prints the usage screen and exits the process.

Parameters
opts:Options

If the parsing of options have started, set a partly populated Options object.

com.sun.tools.xjc back to summary

private final Enum Driver.Mode

extends Enum<Driver.Mode>
Class Inheritance

Operation mode.

Field Summary

Modifier and TypeField and Description
public static final Driver.Mode
public static final Driver.Mode
public static final Driver.Mode
public static final Driver.Mode
public static final Driver.Mode
public static final Driver.Mode

Constructor Summary

AccessConstructor and Description
private
Mode()

Method Summary

Modifier and TypeMethod and Description
public static Driver.Mode
public static Driver.Mode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CODEback to summary
public static final Driver.Mode CODE
DRYRUNback to summary
public static final Driver.Mode DRYRUN
FORESTback to summary
public static final Driver.Mode FOREST
GBINDback to summary
public static final Driver.Mode GBIND
SIGNATUREback to summary
public static final Driver.Mode SIGNATURE
ZIPback to summary
public static final Driver.Mode ZIP

Constructor Detail

Modeback to summary
private Mode()

Method Detail

valueOfback to summary
public static Driver.Mode valueOf(String name)
valuesback to summary
public static Driver.Mode[] values()
com.sun.tools.xjc back to summary

pack-priv Class Driver.OptionsEx

extends Options
Class Inheritance

Command-line arguments processor.

This class contains options that only make sense for the command line interface.

Field Summary

Modifier and TypeField and Description
protected Driver.Mode
mode

Operation mode.

public boolean
noNS

A switch that determines the behavior in the BGM mode.

Inherited from com.sun.tools.xjc.Options:
activePluginsautomaticNameConflictResolutionclassNameAllocatorclassNameReplacerclasspathscompatibilityModecontentForWildcarddebugModedefaultPackagedefaultPackage2disableXmlSecurityenableIntrospectionencodingentityResolverEXTENSIONnoFileHeadernoFileHeaderDatepackageLevelAnnotationspluginURIsproxyAuthquietreadOnlyruntime14STRICTstrictChecktargettargetDirverbose

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
parseArgument(String[] args, int i)

Overrides com.sun.tools.xjc.Options.parseArgument.

Parse XJC-specific options.

Inherited from com.sun.tools.xjc.Options:
addBindFileaddBindFileaddBindFileRecursiveaddCatalogaddGrammaraddGrammaraddGrammarRecursivecreateCodeWritercreateCodeWritergetAllPluginsgetBindFilesgetBuildIDgetFieldRendererFactorygetGrammarsgetModuleNamegetNameConvertergetPrologCommentgetSchemaLanguagegetUserClassLoaderguessSchemaLanguageisExtensionModenormalizeSystemIdparseArgumentsrequireArgumentscanEpisodeFilesetFieldRendererFactorysetNameConvertersetSchemaLanguage

Field Detail

modeback to summary
protected Driver.Mode mode

Operation mode.

noNSback to summary
public boolean noNS

A switch that determines the behavior in the BGM mode.

Constructor Detail

OptionsExback to summary
pack-priv OptionsEx()

Method Detail

parseArgumentback to summary
public int parseArgument(String[] args, int i) throws BadCommandLineException

Overrides com.sun.tools.xjc.Options.parseArgument.

Parse XJC-specific options.

Annotations
@Override
Exceptions
BadCommandLineException:

Doc from com.sun.tools.xjc.Options.parseArgument.

If the callee wants to provide a custom message for an error.

com.sun.tools.xjc back to summary

private final Class Driver.WeAreDone

extends BadCommandLineException
Class Inheritance

Used to signal that we've finished processing.

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from com.sun.tools.xjc.BadCommandLineException:
getOptionsinitOptions

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.sun.tools.xjc.BadCommandLineException.serialVersionUID.

Constructor Detail

WeAreDoneback to summary
private WeAreDone()