org.jvnet.jaxb2_commons.plugin
Class AbstractParameterizablePlugin

java.lang.Object
  extended by com.sun.tools.xjc.Plugin
      extended by org.jvnet.jaxb2_commons.plugin.AbstractPlugin
          extended by org.jvnet.jaxb2_commons.plugin.AbstractParameterizablePlugin
Direct Known Subclasses:
AbstractModelPlugin, AbstractSpringConfigurablePlugin, AnnotatePlugin, AutoInheritancePlugin, CopyablePlugin, EqualsPlugin, HashCodePlugin, InheritancePlugin, MergeablePlugin, SettersPlugin, SimplifyPlugin, ToStringPlugin, WildcardPlugin

public abstract class AbstractParameterizablePlugin
extends AbstractPlugin

Abstract base class for parameterizable JAXB plugins.

This plugin looks for the arguments of the form -myPlugin-name=value (myPlugin is the plugin option name) and then invokes setName(value) on itself.

For instance, the argument -Xfoo-bar=test triggers setBar("test") invocation.

Values are injected using Commons BeanUtils as bean properties, so types will be converted correspondingly

Author:
valikov

Field Summary
 
Fields inherited from class org.jvnet.jaxb2_commons.plugin.AbstractPlugin
logger
 
Constructor Summary
AbstractParameterizablePlugin()
           
 
Method Summary
 int parseArgument(com.sun.tools.xjc.Options opt, String[] args, int start)
          Parses the arguments and injects values into the beans via properties.
 
Methods inherited from class org.jvnet.jaxb2_commons.plugin.AbstractPlugin
afterRun, beforeRun, getCustomizationElementNames, getCustomizationURIs, init, isCustomizationTagName, onActivated, run, run
 
Methods inherited from class com.sun.tools.xjc.Plugin
getOptionName, getUsage, postProcessModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractParameterizablePlugin

public AbstractParameterizablePlugin()
Method Detail

parseArgument

public int parseArgument(com.sun.tools.xjc.Options opt,
                         String[] args,
                         int start)
                  throws com.sun.tools.xjc.BadCommandLineException,
                         IOException
Parses the arguments and injects values into the beans via properties.

Overrides:
parseArgument in class com.sun.tools.xjc.Plugin
Throws:
com.sun.tools.xjc.BadCommandLineException
IOException


Copyright © 2005-2012. All Rights Reserved.