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

Nested Class Summary
static class Generator.Config
          Configuration object storing generation params.
 
Field Summary
protected  java.io.File classes
          compiled classes directory
protected  Generator.Config config
          Configuration to be used
protected static I18n i18n
          i18n
protected static org.objectweb.util.monolog.api.Logger logger
          logger
protected  java.io.File sources
          generated files directory
 
Constructor Summary
Generator(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

i18n

protected static I18n i18n
i18n


logger

protected static final org.objectweb.util.monolog.api.Logger logger
logger


config

protected Generator.Config config
Configuration to be used


classes

protected java.io.File classes
compiled classes directory


sources

protected java.io.File sources
generated files directory

Constructor Detail

Generator

public Generator(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

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