org.objectweb.fractal.juliak.factory
Class InstanceGenerator

java.lang.Object
  extended by org.objectweb.fractal.juliak.factory.InstanceGenerator
Direct Known Subclasses:
InterfaceInstanceGenerator

public class InstanceGenerator
extends Object

Super class for instance generators.

Since:
2.5
Author:
Lionel Seinturier

Field Summary
protected  ClassGenerator generator
          The class generator associated to this instance generator.
 
Constructor Summary
InstanceGenerator(ClassGenerator generator)
           
 
Method Summary
 Object generate(InterfaceType it, InitializationContext ic)
          Generate a new instance with the current class generator.
protected  InstantiationException generateExceptionHandler(Exception e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

generator

protected ClassGenerator generator
The class generator associated to this instance generator.

Constructor Detail

InstanceGenerator

public InstanceGenerator(ClassGenerator generator)
Method Detail

generate

public Object generate(InterfaceType it,
                       InitializationContext ic)
                throws InstantiationException
Generate a new instance with the current class generator.

Parameters:
it - the interface type used to generate the class
ic - the context for initializing the generated class
Returns:
the instance generated by the class generator
Throws:
InstantiationException

generateExceptionHandler

protected InstantiationException generateExceptionHandler(Exception e)