org.objectweb.proactive.core.component.gen
Class AbstractInterfaceClassGenerator

java.lang.Object
  extended byorg.objectweb.proactive.core.component.gen.AbstractInterfaceClassGenerator
Direct Known Subclasses:
MetaObjectInterfaceClassGenerator, OutputInterceptorClassGenerator, RepresentativeInterfaceClassGenerator

public abstract class AbstractInterfaceClassGenerator
extends java.lang.Object

This class is the parent of classes for generating component interfaces. It provides utility methods that are used in subclasses.

Author:
Matthieu Morel

Field Summary
protected static java.util.Hashtable generatedClassesCache
           
protected static org.apache.log4j.Logger logger
           
protected static javassist.ClassPool pool
           
 
Constructor Summary
AbstractInterfaceClassGenerator()
           
 
Method Summary
static void addSuperInterfaces(java.util.List interfaces)
          Gets all super-interfaces from the interfaces of this list, and adds them to this list.
protected static java.lang.Class defineClass(java.lang.String className, byte[] bytes)
           
 ProActiveInterface generateControllerInterface(java.lang.String controllerInterfaceName, Component owner, InterfaceType interfaceType)
           
 ProActiveInterface generateFunctionalInterface(java.lang.String functionalInterfaceName, Component owner, InterfaceType interfaceType)
           
abstract  ProActiveInterface generateInterface(java.lang.String interfaceName, Component owner, InterfaceType interfaceType, boolean isInternal, boolean isFunctionalInterface)
           
static byte[] getClassData(java.lang.String classname)
          retreives the bytecode associated to the generated class of the given name
protected  java.lang.Class loadClass(java.lang.String className)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

pool

protected static javassist.ClassPool pool

generatedClassesCache

protected static java.util.Hashtable generatedClassesCache
Constructor Detail

AbstractInterfaceClassGenerator

public AbstractInterfaceClassGenerator()
Method Detail

loadClass

protected java.lang.Class loadClass(java.lang.String className)
                             throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

generateControllerInterface

public ProActiveInterface generateControllerInterface(java.lang.String controllerInterfaceName,
                                                      Component owner,
                                                      InterfaceType interfaceType)
                                               throws InterfaceGenerationFailedException
Throws:
InterfaceGenerationFailedException

generateFunctionalInterface

public ProActiveInterface generateFunctionalInterface(java.lang.String functionalInterfaceName,
                                                      Component owner,
                                                      InterfaceType interfaceType)
                                               throws InterfaceGenerationFailedException
Throws:
InterfaceGenerationFailedException

generateInterface

public abstract ProActiveInterface generateInterface(java.lang.String interfaceName,
                                                     Component owner,
                                                     InterfaceType interfaceType,
                                                     boolean isInternal,
                                                     boolean isFunctionalInterface)
                                              throws InterfaceGenerationFailedException
Throws:
InterfaceGenerationFailedException

addSuperInterfaces

public static void addSuperInterfaces(java.util.List interfaces)
                               throws javassist.NotFoundException
Gets all super-interfaces from the interfaces of this list, and adds them to this list.

Parameters:
interfaces - a list of interfaces
Throws:
javassist.NotFoundException

defineClass

protected static java.lang.Class defineClass(java.lang.String className,
                                             byte[] bytes)

getClassData

public static byte[] getClassData(java.lang.String classname)
retreives the bytecode associated to the generated class of the given name



Copyright 2001-2005 INRIA All Rights Reserved.