com.sun.tools.xjc.addon.commons_lang
Class XjcCommonsLangPlugin
java.lang.Object
com.sun.tools.xjc.Plugin
com.sun.tools.xjc.addon.commons_lang.XjcCommonsLangPlugin
public class XjcCommonsLangPlugin
- extends com.sun.tools.xjc.Plugin
Automatically generates the toString(), hashCode() and equals() methods
using Jakarta's commons-lang.
Supports the optional ToStringStyle command line parameter to specify
the style for use within the toString method.
Example 1:
-Xcommons-lang
-Xcommons-lang:ToStringStyle=SIMPLE_STYLE
to specify the use of
org.apache.commons.lang.builder.ToStringStyle.SIMPLE_STYLE
Example 2:
-Xcommons-lang
-Xcommons-lang:ToStringStyle=my.CustomToStringStyle
to specify the use of
my.CustomToStringStyle, which must be a subclass of
org.apache.commons.lang.builder.ToStringStyle, and contains a public no-arg constructor.
The default ToStringStyle adopted by this plugin is MULTI_LINE_STYLE.
- Author:
- Hanson Char
- See Also:
org.apache.commons.lang.builder.ToStringStyle
|
Method Summary |
java.lang.String |
getOptionName()
|
java.lang.String |
getUsage()
|
int |
parseArgument(com.sun.tools.xjc.Options opt,
java.lang.String[] args,
int i)
|
boolean |
run(com.sun.tools.xjc.outline.Outline outline,
com.sun.tools.xjc.Options opt,
org.xml.sax.ErrorHandler errorHandler)
|
| Methods inherited from class com.sun.tools.xjc.Plugin |
getCustomizationURIs, isCustomizationTagName, onActivated, postProcessModel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XjcCommonsLangPlugin
public XjcCommonsLangPlugin()
getOptionName
public java.lang.String getOptionName()
- Specified by:
getOptionName in class com.sun.tools.xjc.Plugin
getUsage
public java.lang.String getUsage()
- Specified by:
getUsage in class com.sun.tools.xjc.Plugin
run
public boolean run(com.sun.tools.xjc.outline.Outline outline,
com.sun.tools.xjc.Options opt,
org.xml.sax.ErrorHandler errorHandler)
- Specified by:
run in class com.sun.tools.xjc.Plugin
parseArgument
public int parseArgument(com.sun.tools.xjc.Options opt,
java.lang.String[] args,
int i)
throws com.sun.tools.xjc.BadCommandLineException
- Overrides:
parseArgument in class com.sun.tools.xjc.Plugin
- Throws:
com.sun.tools.xjc.BadCommandLineException
Copyright © 2014. All Rights Reserved.