This class stores invocation configuration for XJC. The configuration in this class should be abstract enough so that it could be parsed from both command-line or Ant.
| Modifier and Type | Field and Description |
|---|---|
| public final List | activePlugins
|
| private List | allPlugins
All discovered |
| public boolean | automaticNameConflictResolution
If true, try to resolve name conflicts automatically by assigning mechanical numbers. |
| private static final String | |
| private final List | |
| private final ArrayList | |
| public ClassNameAllocator | classNameAllocator
This allocator has the final say on deciding the class name. |
| public final Map | |
| public final List | |
| public int | compatibilityMode
this switch determines how carefully the compiler will follow the compatibility rules in the spec. |
| public boolean | contentForWildcard
When on, generates content property for types with multiple xs:any derived elements (which is supposed to be correct behaviour) |
| public boolean | debugMode
If "-debug" is specified. |
| public String | defaultPackage
The -p option that should control the default Java package that will contain the generated code. |
| public String | defaultPackage2
Similar to the -p option, but this one works with a lower priority, and customizations overrides this. |
| public boolean | disableXmlSecurity
If true XML security features when parsing XML documents will be disabled. |
| public boolean | enableIntrospection
When on, fixes getter/setter generation to match the Bean Introspection API |
| public String | encoding
Encoding to be used by generated java sources, null for platform default. |
| public EntityResolver | entityResolver
On JDK 8 an odler stores |
| public static final int | EXTENSION
loosely follow the compatibility rules and allow the use of vendor binding extensions |
| private FieldRendererFactory | fieldRendererFactory
This |
| private Plugin | fieldRendererFactoryOwner
Used to detect if two |
| private final List | grammars
Input schema files as a list of |
| private static final String | |
| private String | javaModule
Java module name in |
| private static final String | |
| private static final String | |
| private static final Logger | |
| private NameConverter | nameConverter
If this is non-null, we use this |
| private Plugin | nameConverterOwner
Used to detect if two |
| public boolean | noFileHeader
No file header comment (to be more friendly with diff.) |
| public boolean | noFileHeaderDate
File header comment without timestamp generation in it (to be more friendly with diff.) |
| public boolean | packageLevelAnnotations
This switch controls whether or not xjc will generate package level annotations |
| private String | pluginLoadFailure
If a plugin failed to load, report. |
| public final Set | pluginURIs
Set of URIs that plug-ins recognize as extension bindings. |
| public String | |
| private String | |
| private String | |
| public boolean | quiet
If the "-quiet" option is specified. |
| public boolean | readOnly
If the -readOnly option is specified. |
| public boolean | runtime14
If -explicit-annotation option is specified. |
| private Language | schemaLanguage
Type of input schema language. |
| public static final int | STRICT
strictly follow the compatibility rules and reject schemas that contain features from App. |
| public boolean | strictCheck
Check the source schemas with extra scrutiny. |
| public SpecVersion | target
Generates output for the specified version of the runtime. |
| public File | targetDir
Target directory when producing files. |
| public boolean | verbose
If the "-verbose" option is specified. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private InputSource | |
| public void | |
| public void | |
| public void | |
| public void | addCatalog(File catalogFile)
Adds a new catalog file.Use created or existed resolver to parse new catalog file. |
| private boolean | |
| private void | addFile(String name, List<InputSource> target, String
If the given token is a directory name, we do a recursive search
and find all files that have the given suffix. suffix)Parses a token to a file (or a set of files)
and add them as |
| public void | |
| public void | |
| public void | |
| private void | |
| public CodeWriter | |
| public CodeWriter | createCodeWriter(CodeWriter core)
Creates a configured CodeWriter that produces files into the specified directory. |
| private InputSource | |
| private <T> List | findServices(Class<T> clazz)
Looks for all "META-INF/services/[className]" files and create one instance for each class name found inside this file. |
| public List | |
| public InputSource[] | |
| public static String | |
| private static boolean | |
| public FieldRendererFactory | Returns: always non-null.Gets the active |
| public InputSource[] | |
| public String | Returns: Java module name option ornull if this option was not set.Gets Java module name option. |
| public NameConverter | Returns: can be null, in which case it's up to the binding.Gets the active |
| public String | getPrologComment()
Gets the string suitable to be used as the prolog comment baked into artifacts.This is the string like "This file was generated by the JAXB RI on YYYY/mm/dd..." |
| public Language | |
| public ClassLoader | getUserClassLoader(ClassLoader parent)
Gets a classLoader that can load classes specified via the -classpath option. |
| public Language | |
| public boolean | |
| private boolean | |
| public static String | |
| public int | Returns: 0 if the argument is not understood. Returning 0 will let the caller report an error.Parses an option |
| public void | |
| private void | |
| public String | requireArgument(String optionName, String[] args, int i)
Obtains an operand and reports an error if it's not there. |
| public void | scanEpisodeFile(File jar)
Finds the |
| public void | setFieldRendererFactory(FieldRendererFactory
The frf, Plugin FieldRendererFactory to be installed. Must not be null.Identifies the plugin that owns this owner)FieldRendererFactory.
When two Plugins try to call this method, this allows XJC
to report it as a user-friendly error message.Sets the |
| public void | setNameConverter(NameConverter
The nc, Plugin NameConverter to be installed. Must not be null.Identifies the plugin that owns this owner)NameConverter.
When two Plugins try to call this method, this allows XJC
to report it as a user-friendly error message.Sets the |
| public void |
| activePlugins | back to summary |
|---|---|
| public final List<Plugin> activePlugins
| |
| allPlugins | back to summary |
|---|---|
| private List<Plugin> allPlugins All discovered
| |
| automaticNameConflictResolution | back to summary |
|---|---|
| public boolean automaticNameConflictResolution If true, try to resolve name conflicts automatically by assigning mechanical numbers. | |
| BIND | back to summary |
|---|---|
| private static final String BIND | |
| bindFiles | back to summary |
|---|---|
| private final List<InputSource> bindFiles | |
| catalogUrls | back to summary |
|---|---|
| private final ArrayList<URI> catalogUrls | |
| classNameAllocator | back to summary |
|---|---|
| public ClassNameAllocator classNameAllocator This allocator has the final say on deciding the class name. | |
| classNameReplacer | back to summary |
|---|---|
| public final Map<String, String> classNameReplacer | |
| classpaths | back to summary |
|---|---|
| public final List<URL> classpaths | |
| compatibilityMode | back to summary |
|---|---|
| public int compatibilityMode this switch determines how carefully the compiler will follow
the compatibility rules in the spec. Either | |
| contentForWildcard | back to summary |
|---|---|
| public boolean contentForWildcard When on, generates content property for types with multiple xs:any derived elements (which is supposed to be correct behaviour) | |
| debugMode | back to summary |
|---|---|
| public boolean debugMode If "-debug" is specified. | |
| defaultPackage | back to summary |
|---|---|
| public String defaultPackage The -p option that should control the default Java package that will contain the generated code. Null if unspecified. | |
| defaultPackage2 | back to summary |
|---|---|
| public String defaultPackage2 Similar to the -p option, but this one works with a lower priority, and customizations overrides this. Used by JAX-RPC. | |
| disableXmlSecurity | back to summary |
|---|---|
| public boolean disableXmlSecurity If true XML security features when parsing XML documents will be disabled. The default value is false. Boolean
| |
| enableIntrospection | back to summary |
|---|---|
| public boolean enableIntrospection When on, fixes getter/setter generation to match the Bean Introspection API | |
| encoding | back to summary |
|---|---|
| public String encoding Encoding to be used by generated java sources, null for platform default. | |
| entityResolver | back to summary |
|---|---|
| public EntityResolver entityResolver On JDK 8 an odler stores | |
| EXTENSION | back to summary |
|---|---|
| public static final int EXTENSION loosely follow the compatibility rules and allow the use of vendor binding extensions | |
| fieldRendererFactory | back to summary |
|---|---|
| private FieldRendererFactory fieldRendererFactory This | |
| fieldRendererFactoryOwner | back to summary |
|---|---|
| private Plugin fieldRendererFactoryOwner Used to detect if two | |
| grammars | back to summary |
|---|---|
| private final List<InputSource> grammars Input schema files as a list of | |
| JAKARTA | back to summary |
|---|---|
| private static final String JAKARTA | |
| javaModule | back to summary |
|---|---|
| private String javaModule Java module name in | |
| JAVAX | back to summary |
|---|---|
| private static final String JAVAX | |
| JAXB_CORE | back to summary |
|---|---|
| private static final String JAXB_CORE | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| nameConverter | back to summary |
|---|---|
| private NameConverter nameConverter If this is non-null, we use this | |
| nameConverterOwner | back to summary |
|---|---|
| private Plugin nameConverterOwner Used to detect if two | |
| noFileHeader | back to summary |
|---|---|
| public boolean noFileHeader No file header comment (to be more friendly with diff.) | |
| noFileHeaderDate | back to summary |
|---|---|
| public boolean noFileHeaderDate File header comment without timestamp generation in it (to be more friendly with diff.) | |
| packageLevelAnnotations | back to summary |
|---|---|
| public boolean packageLevelAnnotations This switch controls whether or not xjc will generate package level annotations | |
| pluginLoadFailure | back to summary |
|---|---|
| private String pluginLoadFailure If a plugin failed to load, report. | |
| pluginURIs | back to summary |
|---|---|
| public final Set<String> pluginURIs Set of URIs that plug-ins recognize as extension bindings. | |
| proxyAuth | back to summary |
|---|---|
| public String proxyAuth | |
| proxyHost | back to summary |
|---|---|
| private String proxyHost | |
| proxyPort | back to summary |
|---|---|
| private String proxyPort | |
| quiet | back to summary |
|---|---|
| public boolean quiet If the "-quiet" option is specified. | |
| readOnly | back to summary |
|---|---|
| public boolean readOnly If the -readOnly option is specified. | |
| runtime14 | back to summary |
|---|---|
| public boolean runtime14 If -explicit-annotation option is specified. This generates code that works around issues specific to 1.4 runtime. | |
| schemaLanguage | back to summary |
|---|---|
| private Language schemaLanguage Type of input schema language. One of the | |
| STRICT | back to summary |
|---|---|
| public static final int STRICT strictly follow the compatibility rules and reject schemas that contain features from App. E.2, use vendor binding extensions | |
| strictCheck | back to summary |
|---|---|
| public boolean strictCheck Check the source schemas with extra scrutiny. The exact meaning depends on the schema language. | |
| target | back to summary |
|---|---|
| public SpecVersion target Generates output for the specified version of the runtime. | |
| targetDir | back to summary |
|---|---|
| public File targetDir Target directory when producing files.
This field is not used when XJC is driven through the XJC API.
Plugins that need to generate extra files should do so by using
| |
| verbose | back to summary |
|---|---|
| public boolean verbose If the "-verbose" option is specified. | |
| Options | back to summary |
|---|---|
| public Options() | |
| absolutize | back to summary |
|---|---|
| private InputSource absolutize(InputSource is) | |
| addBindFile | back to summary |
|---|---|
| public void addBindFile(InputSource is) Adds a new binding file. | |
| addBindFile | back to summary |
|---|---|
| public void addBindFile(File bindFile) Adds a new binding file. | |
| addBindFileRecursive | back to summary |
|---|---|
| public void addBindFileRecursive(File dir) Recursively scan directories and add all ".xjb" files in it. | |
| addCatalog | back to summary |
|---|---|
| public void addCatalog(File catalogFile) throws IOException Adds a new catalog file.Use created or existed resolver to parse new catalog file. | |
| addClassNameReplacers | back to summary |
|---|---|
| private boolean addClassNameReplacers(SpecVersion target) | |
| addFile | back to summary |
|---|---|
| private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException Parses a token to a file (or a set of files)
and add them as
| |
| addGrammar | back to summary |
|---|---|
| public void addGrammar(InputSource is) Adds a new input schema. | |
| addGrammar | back to summary |
|---|---|
| public void addGrammar(File source) | |
| addGrammarRecursive | back to summary |
|---|---|
| public void addGrammarRecursive(File dir) Recursively scan directories and add all XSD files in it. | |
| addRecursive | back to summary |
|---|---|
| private void addRecursive(File dir, String suffix, List<InputSource> result) | |
| createCodeWriter | back to summary |
|---|---|
| public CodeWriter createCodeWriter() throws IOException Creates a configured CodeWriter that produces files into the specified directory. | |
| createCodeWriter | back to summary |
|---|---|
| public CodeWriter createCodeWriter(CodeWriter core) Creates a configured CodeWriter that produces files into the specified directory. | |
| fileToInputSource | back to summary |
|---|---|
| private InputSource fileToInputSource(File source) | |
| findServices | back to summary |
|---|---|
| private <T> List Looks for all "META-INF/services/[className]" files and create one instance for each class name found inside this file. | |
| getAllPlugins | back to summary |
|---|---|
| public List Gets all the
A plugins are enumerated when this method is called for the first time,
by taking | |
| getBindFiles | back to summary |
|---|---|
| public InputSource[] getBindFiles() Input external binding files. | |
| getBuildID | back to summary |
|---|---|
| public static String getBuildID() | |
| getDebugPropertyValue | back to summary |
|---|---|
| private static boolean getDebugPropertyValue() | |
| getFieldRendererFactory | back to summary |
|---|---|
| public FieldRendererFactory getFieldRendererFactory() Gets the active
| |
| getGrammars | back to summary |
|---|---|
| public InputSource[] getGrammars() Input schema files. | |
| getModuleName | back to summary |
|---|---|
| public String getModuleName() Gets Java module name option.
| |
| getNameConverter | back to summary |
|---|---|
| public NameConverter getNameConverter() Gets the active
| |
| getPrologComment | back to summary |
|---|---|
| public String getPrologComment() Gets the string suitable to be used as the prolog comment baked into artifacts.This is the string like "This file was generated by the JAXB RI on YYYY/mm/dd..." | |
| getSchemaLanguage | back to summary |
|---|---|
| public Language getSchemaLanguage() | |
| getUserClassLoader | back to summary |
|---|---|
| public ClassLoader getUserClassLoader(ClassLoader parent) Gets a classLoader that can load classes specified via the -classpath option. | |
| guessSchemaLanguage | back to summary |
|---|---|
| public Language guessSchemaLanguage() Guesses the schema language. | |
| isExtensionMode | back to summary |
|---|---|
| public boolean isExtensionMode() | |
| isJavax | back to summary |
|---|---|
| private boolean isJavax() | |
| normalizeSystemId | back to summary |
|---|---|
| public static String normalizeSystemId(String systemId) | |
| parseArgument | back to summary |
|---|---|
| public int parseArgument(String[] args, int i) throws BadCommandLineException Parses an option
| |
| parseArguments | back to summary |
|---|---|
| public void parseArguments(String[] args) throws BadCommandLineException Parses arguments and fill fields of this object.
| |
| parseProxy | back to summary |
|---|---|
| private void parseProxy(String text) throws BadCommandLineException | |
| requireArgument | back to summary |
|---|---|
| public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException Obtains an operand and reports an error if it's not there. | |
| scanEpisodeFile | back to summary |
|---|---|
| public void scanEpisodeFile(File jar) throws BadCommandLineException Finds the | |
| setFieldRendererFactory | back to summary |
|---|---|
| public void setFieldRendererFactory(FieldRendererFactory frf, Plugin owner) throws BadCommandLineException Sets the
This method is for plugins to call to set a custom
| |
| setNameConverter | back to summary |
|---|---|
| public void setNameConverter(NameConverter nc, Plugin owner) throws BadCommandLineException Sets the
This method is for plugins to call to set a custom
| |
| setSchemaLanguage | back to summary |
|---|---|
| public void setSchemaLanguage(Language _schemaLanguage) | |