This add-on will be called after the default bean generation has finished.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public List | Returns: can be empty, be never be null.Returns the list of namespace URIs that are supported by this plug-in as schema annotations. |
| public abstract String | |
| public abstract String | Returns: localized description message. should be terminated by \n.Gets the description of this add-on. |
| public boolean | isCustomizationTagName(String
the namespace URI of the element. Never null. nsUri, String the local name of the element. Never null. localName)Checks if the given tag name is a valid tag name for the customization element in this plug-in. This method is invoked by XJC to determine if the user-specified customization element is really a customization or not. |
| public void | |
| public int | Returns: 0 if the argument is not understood. Otherwise return the number of tokens that are consumed, including the option itself. (so if you have an option like "-foo 3", return 2.)Parses an option |
| public void | postProcessModel(Model
The object that represents the classes/properties to
be generated. model, ErrorHandler Errors should be reported to this handler. errorHandler)Performs the post-processing of the |
| public abstract boolean | Returns: If the add-on executes successfully, return true. If it detects some errors but those are reported and recovered gracefully, return false.This object allows access to various generated code. outline, Options opt, ErrorHandler Errors should be reported to this handler. errorHandler)Run the add-on. |
| Plugin | back to summary |
|---|---|
| protected Plugin() Default constructor. | |
| getCustomizationURIs | back to summary |
|---|---|
| public List Returns the list of namespace URIs that are supported by this plug-in as schema annotations. If a plug-in returns a non-empty list, the JAXB RI will recognize these namespace URIs as vendor extensions (much like "http://java.sun.com/xml/ns/jaxb/xjc"). This allows users to write those annotations inside a schema, or in external binding files, and later plug-ins can access those annotations as DOM nodes. See http://java.sun.com/webservices/docs/1.5/jaxb/vendorCustomizations.html for the syntax that users need to use to enable extension URIs. | |
| getOptionName | back to summary |
|---|---|
| public abstract String getOptionName() Gets the option name to turn on this add-on. For example, if "abc" is returned, "-abc" will turn on this plugin. A plugin needs to be turned on explicitly, or else no other methods of will be invoked.
Starting 2.1, when an option matches the name returned
from this method, XJC will then invoke | |
| getUsage | back to summary |
|---|---|
| public abstract String getUsage() Gets the description of this add-on. Used to generate a usage screen.
| |
| isCustomizationTagName | back to summary |
|---|---|
| public boolean isCustomizationTagName(String nsUri, String localName) Checks if the given tag name is a valid tag name for the customization element in this plug-in. This method is invoked by XJC to determine if the user-specified customization element is really a customization or not. This information is used to pick the proper error message.
A plug-in is still encouraged to do the validation of the customization element in the
| |
| onActivated | back to summary |
|---|---|
| public void onActivated(Options opts) throws BadCommandLineException Notifies a plugin that it's activated.
This method is called when a plugin is activated
through the command line option (as specified by
This is a good opportunity to use
Noop by default.
| |
| parseArgument | back to summary |
|---|---|
| public int parseArgument(Options opt, String[] args, int i) throws BadCommandLineException, IOException Parses an option The callee doesn't need to recognize the option that the getOptionName method returns. Once a plugin is activated, this method is called for options that XJC didn't recognize. This allows a plugin to define additional options to customize its behavior.
Since options can appear in no particular order,
XJC allows sub-options of a plugin to show up before
the option that activates a plugin (one that's returned
by
| |
| postProcessModel | back to summary |
|---|---|
| public void postProcessModel(Model model, ErrorHandler errorHandler) Performs the post-processing of the This method is invoked after XJC has internally finished the model construction. This is a chance for a plugin to affect the way code generation is performed.
Compared to the Note that this method is invoked only when a is activated.
| |
| run | back to summary |
|---|---|
| public abstract boolean run(Outline outline, Options opt, ErrorHandler errorHandler) throws SAXException Run the add-on.
This method is invoked after XJC has internally finished
the code generation. Plugins can tweak some of the generated
code (or add more code) by using Note that this method is invoked only when a is activated.
| |