JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.util
Class WrapLib

java.lang.Object
  |
  +--org.objectweb.jac.util.WrapLib

public class WrapLib
extends Object

This class generates the jac.lib delegators source-files from the jac.prop file found in the current directory (exclude all other options).

Author:
Renaud Pawlak

Constructor Summary
WrapLib()
           
 
Method Summary
protected static void createDelegator(Class c)
          Creates a class that present the same interface that the original class but that delegates all the work to an instance of the original class.
static String listAsString(List l)
           
static void main(String[] args)
          The entry point of the wraplib program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrapLib

public WrapLib()
Method Detail

listAsString

public static String listAsString(List l)

main

public static void main(String[] args)
                 throws Throwable
The entry point of the wraplib program.

Parameters:
args - none arguments are expected (parametrization is done by the jac.prop file in the current directory -- user should define the jac.toWrap property as a list of classes to wrap
Throwable

createDelegator

protected static void createDelegator(Class c)
Creates a class that present the same interface that the original class but that delegates all the work to an instance of the original class.

This feature is implemented to be able to easily wrap libraries that would have been hardly wrappable on the "as is" classes, for instance the jdk classes (see the -g option of Jac).

As a result, this method creates a Java source file in the src/org/objectweb/jac/lib directory of the JAC distribution. This file should then be compiled as a regular file.

Parameters:
c - the original class

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli