org.objectweb.fractal.aokell.tools.interf
Class AbstractInterfaceGenerator

java.lang.Object
  extended by org.objectweb.fractal.aokell.tools.interf.AbstractInterfaceGenerator
Direct Known Subclasses:
ADLInterfaceGenerator, InterfaceGenerator

public class AbstractInterfaceGenerator
extends Object

This class contains code elements shared by the Fractal interface generator tools.

Author:
Lionel Seinturier

Field Summary
protected  String[] args
           
protected static String generatedDirname
          The directory where the generated files are stored.
protected static String packageprefix
          Root package for generated files.
 
Constructor Summary
AbstractInterfaceGenerator(String[] args)
           
 
Method Summary
protected  void epilogue(PrintWriter pw)
           
protected  void generateInterface(String originterfacename, boolean boundable)
          Generate the Java implementation class for a Fractal interface.
protected  String getClassName(Class cl)
          Workaround for Class.getName() which returns something like Laokell.lib.control.Controller; for array types.
protected  void prologue(PrintWriter pw, String packagename, String classname, String interfacename, boolean boundable, boolean isAttributeControllerItf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

generatedDirname

protected static String generatedDirname
The directory where the generated files are stored.


packageprefix

protected static final String packageprefix
Root package for generated files.

See Also:
Constant Field Values

args

protected String[] args
Constructor Detail

AbstractInterfaceGenerator

public AbstractInterfaceGenerator(String[] args)
Method Detail

generateInterface

protected void generateInterface(String originterfacename,
                                 boolean boundable)
                          throws IOException,
                                 ClassNotFoundException
Generate the Java implementation class for a Fractal interface. For attribute-controller interfaces, generate also the fields to store a copy of the component state and a cloneFcCtrl method to clone this state.

Parameters:
boundable - true if a boundable interface must be generated false if an implemented interface must be generated
Throws:
IOException
ClassNotFoundException

prologue

protected void prologue(PrintWriter pw,
                        String packagename,
                        String classname,
                        String interfacename,
                        boolean boundable,
                        boolean isAttributeControllerItf)
                 throws IOException
Throws:
IOException

epilogue

protected void epilogue(PrintWriter pw)
                 throws IOException
Throws:
IOException

getClassName

protected String getClassName(Class cl)
Workaround for Class.getName() which returns something like Laokell.lib.control.Controller; for array types.