com.sun.tools.xjc.addon.sync
Class SynchronizedMethodAddOn

java.lang.Object
  extended by com.sun.tools.xjc.Plugin
      extended by com.sun.tools.xjc.addon.sync.SynchronizedMethodAddOn

public class SynchronizedMethodAddOn
extends Plugin

Generates synchronized methods.


Constructor Summary
SynchronizedMethodAddOn()
           
 
Method Summary
 java.lang.String getOptionName()
          Gets the option name to turn on this add-on.
 java.lang.String getUsage()
          Gets the description of this add-on.
 int parseArgument(Options opt, java.lang.String[] args, int i)
          Parses an option args[i] and augment the opt object appropriately, then return the number of tokens consumed.
 boolean run(Outline model, Options opt, org.xml.sax.ErrorHandler errorHandler)
          Run the add-on.
 
Methods inherited from class com.sun.tools.xjc.Plugin
getCustomizationURIs, isCustomizationTagName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizedMethodAddOn

public SynchronizedMethodAddOn()
Method Detail

getOptionName

public java.lang.String 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 extension.

Specified by:
getOptionName in class Plugin

getUsage

public java.lang.String getUsage()
Description copied from class: Plugin
Gets the description of this add-on. Used to generate a usage screen.

Specified by:
getUsage in class Plugin
Returns:
localized description message. should be terminated by \n.

parseArgument

public int parseArgument(Options opt,
                         java.lang.String[] args,
                         int i)
                  throws BadCommandLineException,
                         java.io.IOException
Description copied from class: Plugin
Parses an option args[i] and augment the opt object appropriately, then return the number of tokens consumed.

The callee doesn't need to recognize the option that the getOptionName method returns.

Overrides:
parseArgument in class Plugin
Returns:
0 if the argument is not understood.
Throws:
BadCommandLineException - If the option was recognized but there's an error.
java.io.IOException

run

public boolean run(Outline model,
                   Options opt,
                   org.xml.sax.ErrorHandler errorHandler)
Description copied from class: Plugin
Run the add-on.

Specified by:
run in class Plugin
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.