| Constructor and Description |
|---|
PluginImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getOptionName()
Gets the option name to turn on this add-on.
|
String |
getUsage()
Gets the description of this add-on.
|
boolean |
run(Model model,
WsimportOptions wo,
ErrorReceiver er)
Run the add-on.
|
onActivated, parseArgumentpublic String getOptionName()
Plugin 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 Plugin
will be invoked.
When an option matches the name returned from this method, WsImport
will then invoke Plugin.parseArgument(Options, String[], int), allowing
plugins to handle arguments to this option.
getOptionName in class Pluginpublic String getUsage()
Pluginpublic boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException
Plugin This method is invoked after WsImport has internally finished the
code generation. Plugins can tweak some of the generated code (or add
more code) by altering JCodeModel obtained from WsimportOptions.getCodeModel() according to the current
WSDL model and WsimportOptions.
Note that this method is invoked only when a Plugin is
activated.
run in class Pluginmodel - This object allows access to the WSDL model used for
code generation.wo - This object allows access to various options used for code
generation as well as access to the generated code.SAXException - After an error is reported to ErrorHandler,
the same exception can be thrown to indicate a fatal irrecoverable error. ErrorHandler
itself may throw it, if it chooses not to recover from the error.Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.