Class PluginImpl
java.lang.Object
com.sun.tools.xjc.Plugin
com.sun.tools.xjc.addon.at_generated.PluginImpl
Plugin
that marks the generated code by using JSR-250's '@Generated'.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the option name to turn on this add-on.getUsage()
Gets the description of this add-on.boolean
run
(Outline model, Options opt, ErrorHandler errorHandler) Run the add-on.Methods inherited from class com.sun.tools.xjc.Plugin
getCustomizationURIs, isCustomizationTagName, onActivated, parseArgument, postProcessModel
-
Constructor Details
-
PluginImpl
public PluginImpl()
-
-
Method Details
-
getOptionName
Description copied from class:Plugin
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
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.- Specified by:
getOptionName
in classPlugin
-
getUsage
Description copied from class:Plugin
Gets the description of this add-on. Used to generate a usage screen. -
run
Description copied from class:Plugin
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
Outline
andOptions
.Note that this method is invoked only when a
Plugin
is activated.- Specified by:
run
in classPlugin
- Parameters:
model
- This object allows access to various generated code.errorHandler
- Errors should be reported to this handler.- Returns:
- If the add-on executes successfully, return true. If it detects some errors but those are reported and recovered gracefully, return false.
-