org.ow2.jonas.generators.genclientstub.generator
Class Generator

java.lang.Object
  extended by org.ow2.jonas.generators.genbase.generator.AbsGenerator
      extended by org.ow2.jonas.generators.genclientstub.generator.Generator

public class Generator
extends AbsGenerator

Generator used to generate Stubs for clients.

Author:
Florent Benoit

Constructor Summary
Generator(Config config, IEJBRefDesc ejbRef, String intfStubClassName, Archive archive)
          Creates a new Generator with the given Config.
 
Method Summary
 void addFiles(Archive archive)
          Add generated files into an Archive
 void compile()
          Compile generated java files into classes directory.
 void generate()
          Generate stub files.
 
Methods inherited from class org.ow2.jonas.generators.genbase.generator.AbsGenerator
getClasses, getConfig, getJavaSources, 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,
                 IEJBRefDesc ejbRef,
                 String intfStubClassName,
                 Archive archive)
          throws GenBaseException
Creates a new Generator with the given Config.

Parameters:
config - internal configuration object.
ejbRef - reference to the ejb on which we want create the stub
intfStubClassName - name of the interface
archive - given ejbjar, webapp, ...
Throws:
GenBaseException - When sources and target temporary directory cannot be created
Method Detail

generate

public void generate()
              throws ClientStubGenException
Generate stub files.

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

compile

public void compile()
             throws ClientStubGenException
Compile generated java files into classes directory. Do nothing in case of clientstub generator as all classes are generated

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

addFiles

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

Specified by:
addFiles in class AbsGenerator
Parameters:
archive - the archive destination of generated files.
Throws:
ClientStubGenException - When files cannot be added in the given Archive.


Copyright © 2010 OW2 Consortium. All Rights Reserved.