org.objectweb.jonas_ws.wsgen.generator
Class Generator

java.lang.Object
  extended byorg.objectweb.jonas_ws.wsgen.generator.Generator
Direct Known Subclasses:
WsClientGenerator, WsEndpointGenerator

public abstract class Generator
extends java.lang.Object

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
abstract  void addFiles(Archive archive)
          Add generated files into an Archive
 void compile()
          Compile generated java files into classes directory.
abstract  void generate()
          Generate files.
 java.io.File getClasses()
           
 Config getConfig()
           
static I18n getI18n()
           
static org.objectweb.util.monolog.api.Logger getLogger()
           
 java.io.File 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 WsGenException
Creates a new Generator with the given Config.

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

generate

public abstract void generate()
                       throws WsGenException
Generate files.

Throws:
WsGenException - When generation fails.

compile

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

Throws:
WsGenException - When compilation fails

addFiles

public abstract void addFiles(Archive archive)
                       throws WsGenException
Add generated files into an Archive

Parameters:
archive - the archive destination of generated files.
Throws:
WsGenException - When files cannot be added in the given Archive.

getConfig

public Config getConfig()
Returns:
Returns the config.

getI18n

public static I18n getI18n()
Returns:
Returns the i18n.

getLogger

public static org.objectweb.util.monolog.api.Logger getLogger()
Returns:
Returns the logger.

getClasses

public java.io.File getClasses()
Returns:
Returns the classes.

getSources

public java.io.File getSources()
Returns:
Returns the sources.