public class ProxyGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ProxyGenerator |
INSTANCE |
Constructor and Description |
---|
ProxyGenerator() |
Modifier and Type | Method and Description |
---|---|
boolean |
getDebug() |
boolean |
getEmptyMethods() |
java.lang.ClassLoader |
getOverride() |
GroovyObject |
instantiateAggregate(java.util.List<java.lang.Class> interfaces) |
GroovyObject |
instantiateAggregate(java.util.Map closureMap,
java.util.List<java.lang.Class> interfaces) |
GroovyObject |
instantiateAggregate(java.util.Map closureMap,
java.util.List<java.lang.Class> interfaces,
java.lang.Class clazz) |
GroovyObject |
instantiateAggregate(java.util.Map closureMap,
java.util.List<java.lang.Class> interfaces,
java.lang.Class clazz,
java.lang.Object[] constructorArgs) |
GroovyObject |
instantiateAggregateFromBaseClass(java.lang.Class clazz) |
GroovyObject |
instantiateAggregateFromBaseClass(java.lang.Class clazz,
java.lang.Object[] constructorArgs) |
GroovyObject |
instantiateAggregateFromBaseClass(Closure cl,
java.lang.Class clazz) |
GroovyObject |
instantiateAggregateFromBaseClass(java.util.Map map,
java.lang.Class clazz) |
GroovyObject |
instantiateAggregateFromBaseClass(java.util.Map map,
java.lang.Class clazz,
java.lang.Object[] constructorArgs) |
GroovyObject |
instantiateAggregateFromInterface(java.lang.Class clazz) |
GroovyObject |
instantiateAggregateFromInterface(java.util.Map map,
java.lang.Class clazz) |
GroovyObject |
instantiateDelegate(java.util.List<java.lang.Class> interfaces,
java.lang.Object delegate) |
GroovyObject |
instantiateDelegate(java.util.Map closureMap,
java.util.List<java.lang.Class> interfaces,
java.lang.Object delegate) |
GroovyObject |
instantiateDelegate(java.lang.Object delegate) |
GroovyObject |
instantiateDelegateWithBaseClass(java.util.Map closureMap,
java.util.List<java.lang.Class> interfaces,
java.lang.Object delegate) |
GroovyObject |
instantiateDelegateWithBaseClass(java.util.Map closureMap,
java.util.List<java.lang.Class> interfaces,
java.lang.Object delegate,
java.lang.Class baseClass) |
GroovyObject |
instantiateDelegateWithBaseClass(java.util.Map closureMap,
java.util.List<java.lang.Class> interfaces,
java.lang.Object delegate,
java.lang.Class baseClass,
java.lang.String name)
Creates a proxy with a delegate object.
|
void |
setDebug(boolean debug)
Instructs
ProxyGenerator to dump generated Groovy
source code to standard output during construction. |
void |
setEmptyMethods(boolean emptyMethods)
Changes generated methods to have empty implementations.
|
void |
setOverride(java.lang.ClassLoader override) |
public static final ProxyGenerator INSTANCE
public boolean getDebug()
public void setDebug(boolean debug)
ProxyGenerator
to dump generated Groovy
source code to standard output during construction. This is useful
for debugging purposes but should be turned off in production.debug
- true if you want generated source to be printedpublic boolean getEmptyMethods()
public void setEmptyMethods(boolean emptyMethods)
UnsupportedOperationException
but setting this boolean will leave it empty.emptyMethods
- true if you want generated methods to be emptypublic java.lang.ClassLoader getOverride()
public void setOverride(java.lang.ClassLoader override)
public GroovyObject instantiateAggregateFromBaseClass(java.lang.Class clazz)
public GroovyObject instantiateAggregateFromBaseClass(java.util.Map map, java.lang.Class clazz)
public GroovyObject instantiateAggregateFromBaseClass(Closure cl, java.lang.Class clazz)
public GroovyObject instantiateAggregateFromBaseClass(java.lang.Class clazz, java.lang.Object[] constructorArgs)
public GroovyObject instantiateAggregateFromBaseClass(java.util.Map map, java.lang.Class clazz, java.lang.Object[] constructorArgs)
public GroovyObject instantiateAggregateFromInterface(java.lang.Class clazz)
public GroovyObject instantiateAggregateFromInterface(java.util.Map map, java.lang.Class clazz)
public GroovyObject instantiateAggregate(java.util.List<java.lang.Class> interfaces)
public GroovyObject instantiateAggregate(java.util.Map closureMap, java.util.List<java.lang.Class> interfaces)
public GroovyObject instantiateAggregate(java.util.Map closureMap, java.util.List<java.lang.Class> interfaces, java.lang.Class clazz)
public GroovyObject instantiateAggregate(java.util.Map closureMap, java.util.List<java.lang.Class> interfaces, java.lang.Class clazz, java.lang.Object[] constructorArgs)
public GroovyObject instantiateDelegate(java.lang.Object delegate)
public GroovyObject instantiateDelegate(java.util.List<java.lang.Class> interfaces, java.lang.Object delegate)
public GroovyObject instantiateDelegate(java.util.Map closureMap, java.util.List<java.lang.Class> interfaces, java.lang.Object delegate)
public GroovyObject instantiateDelegateWithBaseClass(java.util.Map closureMap, java.util.List<java.lang.Class> interfaces, java.lang.Object delegate)
public GroovyObject instantiateDelegateWithBaseClass(java.util.Map closureMap, java.util.List<java.lang.Class> interfaces, java.lang.Object delegate, java.lang.Class baseClass)
public GroovyObject instantiateDelegateWithBaseClass(java.util.Map closureMap, java.util.List<java.lang.Class> interfaces, java.lang.Object delegate, java.lang.Class baseClass, java.lang.String name)
closureMap
- the closure for methods not handled by the delegateinterfaces
- interfaces to be implementeddelegate
- the delegate objectbaseClass
- the base classname
- the name of the proxy, unused, but kept for compatibility with previous versions of Groovy.