Plugin that marks the generated code by using '@Generated'.
| Modifier and Type | Field and Description |
|---|---|
| private JClass | |
| private String | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| private void | |
| private String | Returns: the date valuecalculate the date value in ISO8601 format for the @Generated annotation |
| public String | getOptionName()
Implements abstract com. Gets the option name to turn on this add-on. |
| public String | getUsage()
Implements abstract com. Gets the description of this add-on. |
| public int | parseArgument(Options opt, String[] args, int i)
Overrides com. Parses an option |
| public boolean | run(Outline model, Options opt, ErrorHandler errorHandler)
Implements abstract com. Run the add-on. |
| annotation | back to summary |
|---|---|
| private JClass annotation | |
| date | back to summary |
|---|---|
| private String date | |
| genAnnotation | back to summary |
|---|---|
| private String genAnnotation | |
| noDate | back to summary |
|---|---|
| private boolean noDate | |
| PluginImpl | back to summary |
|---|---|
| public PluginImpl() | |
| annotate | back to summary |
|---|---|
| private void annotate(JAnnotatable m) | |
| augument | back to summary |
|---|---|
| private void augument(EnumOutline eo) | |
| augument | back to summary |
|---|---|
| private void augument(ClassOutline co) Adds "@Generated" to the classes, methods, and fields. | |
| augument | back to summary |
|---|---|
| private void augument(PackageOutline po) | |
| getISO8601Date | back to summary |
|---|---|
| private String getISO8601Date() calculate the date value in ISO8601 format for the @Generated annotation
| |
| getOptionName | back to summary |
|---|---|
| public String getOptionName() Implements abstract com. Doc from com. 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 String getUsage() Implements abstract com. Doc from com. Gets the description of this add-on. Used to generate a usage screen.
| |
| parseArgument | back to summary |
|---|---|
| public int parseArgument(Options opt, String[] args, int i) throws BadCommandLineException, IOException Overrides com. Doc from com. 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
| |
| run | back to summary |
|---|---|
| public boolean run(Outline model, Options opt, ErrorHandler errorHandler) Implements abstract com. Doc from com. 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.
| |