Class ClosureFactory<C>

java.lang.Object
eu.bandm.tools.lljava.live.ClosureFactory<C>
Type Parameters:
C - the class of the closure prototype

public class ClosureFactory<C> extends Object
A factory to create new objects from a closure prototype.

A closure is a class that has been augmented with synthetic fields and constructor arguments to retain values of enclosing this references (for non-static nested classes) and captured variables (for local and anonymous classes).

This factory implementation support both the creation of new objects of the same class and objects of dynamically constructed subclasses, with the same values for the synthetic fields as present in a given prototype object.

The class of the prototype is assume to have an accessible constructor that has exactly the synthetic parameters, and no others. This is automatically the case if there is no constructor in Java source code, and a default is defined implicitly.