org.objectweb.jonas_ws.wsgen.generator
Class Generator

java.lang.Object
  extended by org.objectweb.jonas_lib.genbase.generator.AbsGenerator
      extended by org.objectweb.jonas_ws.wsgen.generator.Generator
Direct Known Subclasses:
WsClientGenerator, WsEndpointGenerator

public abstract class Generator
extends AbsGenerator

Generators provide a structure to be extended for specific generation mecanisms. Axis will provide an AxisWsClientGenerator that will be in charge of client side generation (WSDL2Java tool) and an AxisWsEndpointGenerator that will bother with server side artifact generation.

Author:
Guillaume Sauthier

Constructor Summary
Generator(Config config)
          Creates a new Generator with the given Config.
 
Method Summary
 void compile()
          Compile generated java files into classes directory.
abstract  void generate()
          Generate files.
protected static I18n getI18n()
           
 
Methods inherited from class org.objectweb.jonas_lib.genbase.generator.AbsGenerator
addFiles, addJavaSources, getClasses, getConfig, getLogger, getSources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator(Config config)
          throws GenBaseException
Creates a new Generator with the given Config.

Parameters:
config - internal configuration object.
Throws:
GenBaseException - When sources and target temporary directory cannot be created
Method Detail

generate

public abstract void generate()
                       throws WsGenException
Generate files.

Specified by:
generate in class AbsGenerator
Throws:
WsGenException - When generation fails.

compile

public void compile()
             throws WsGenException
Compile generated java files into classes directory.

Specified by:
compile in class AbsGenerator
Throws:
WsGenException - When compilation fails

getI18n

protected static I18n getI18n()
Returns:
the i18n.