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(Outline model,
Options opt,
ErrorHandler errorHandler)
Run the add-on.
|
getCustomizationURIs, isCustomizationTagName, onActivated, parseArgument, postProcessModel
public 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.
Starting 2.1, when an option matches the name returned
from this method, XJC will then invoke Plugin.parseArgument(Options, String[], int)
,
allowing plugins to handle arguments to this option.
getOptionName
in class Plugin
public String getUsage()
Plugin
public boolean run(Outline model, Options opt, ErrorHandler errorHandler)
Plugin
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 Outline
and Options
.
Note that this method is invoked only when a Plugin
is activated.
run
in class Plugin
model
- This object allows access to various generated code.errorHandler
- Errors should be reported to this handler.Copyright © 2020 JBoss by Red Hat. All rights reserved.