|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovy.util.ProxyGenerator
public class ProxyGenerator extends java.lang.Object
Classes to generate 'Proxy' objects which implement interfaces, maps of closures and/or extend classes/delegates.
Field Summary | |
---|---|
static ProxyGenerator |
INSTANCE
|
Method Summary | |
---|---|
boolean
|
getDebug()
|
boolean
|
getEmptyMethods()
|
java.lang.ClassLoader
|
getOverride()
|
GroovyObject
|
instantiateAggregate(java.util.List interfaces)
|
GroovyObject
|
instantiateAggregate(java.util.Map closureMap, java.util.List interfaces)
|
GroovyObject
|
instantiateAggregate(java.util.Map closureMap, java.util.List interfaces, java.lang.Class clazz)
|
GroovyObject
|
instantiateAggregate(java.util.Map closureMap, java.util.List interfaces, java.lang.Class clazz, java.lang.Object[] constructorArgs)
|
GroovyObject
|
instantiateAggregateFromBaseClass(java.lang.Class clazz)
|
GroovyObject
|
instantiateAggregateFromBaseClass(java.util.Map map, java.lang.Class clazz)
|
GroovyObject
|
instantiateAggregateFromBaseClass(Closure cl, java.lang.Class clazz)
|
GroovyObject
|
instantiateAggregateFromBaseClass(java.lang.Class clazz, java.lang.Object[] constructorArgs)
|
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.lang.Object delegate)
|
GroovyObject
|
instantiateDelegate(java.util.List interfaces, java.lang.Object delegate)
|
GroovyObject
|
instantiateDelegate(java.util.Map closureMap, java.util.List interfaces, java.lang.Object delegate)
|
GroovyObject
|
instantiateDelegateWithBaseClass(java.util.Map closureMap, java.util.List interfaces, java.lang.Object delegate)
|
GroovyObject
|
instantiateDelegateWithBaseClass(java.util.Map closureMap, java.util.List interfaces, java.lang.Object delegate, java.lang.Class baseClass)
|
GroovyObject
|
instantiateDelegateWithBaseClass(java.util.Map closureMap, java.util.List 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 |
void
|
setEmptyMethods(boolean emptyMethods)
Changes generated methods to have empty implementations. |
void
|
setOverride(java.lang.ClassLoader override)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
public static final ProxyGenerator INSTANCE
Method Detail |
---|
public boolean getDebug()
public boolean getEmptyMethods()
public java.lang.ClassLoader getOverride()
public GroovyObject instantiateAggregate(java.util.List interfaces)
public GroovyObject instantiateAggregate(java.util.Map closureMap, java.util.List interfaces)
public GroovyObject instantiateAggregate(java.util.Map closureMap, java.util.List interfaces, java.lang.Class clazz)
public GroovyObject instantiateAggregate(Map closureMap, Listinterfaces, Class clazz, Object[] constructorArgs) { public GroovyObject instantiateAggregate(java.util.Map closureMap, java.util.List interfaces, java.lang.Class clazz, java.lang.Object[] constructorArgs)
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 instantiateDelegate(java.lang.Object delegate)
public GroovyObject instantiateDelegate(java.util.List interfaces, java.lang.Object delegate)
public GroovyObject instantiateDelegate(java.util.Map closureMap, java.util.List interfaces, java.lang.Object delegate)
public GroovyObject instantiateDelegateWithBaseClass(java.util.Map closureMap, java.util.List interfaces, java.lang.Object delegate)
public GroovyObject instantiateDelegateWithBaseClass(java.util.Map closureMap, java.util.List interfaces, java.lang.Object delegate, java.lang.Class baseClass)
public GroovyObject instantiateDelegateWithBaseClass(Map closureMap, Listinterfaces, Object delegate, Class baseClass, String name) { public GroovyObject instantiateDelegateWithBaseClass(java.util.Map closureMap, java.util.List 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.
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 printed
public void setEmptyMethods(boolean emptyMethods)
UnsupportedOperationException
but setting this boolean will leave it empty.
emptyMethods
- true if you want generated methods to be empty
public void setOverride(java.lang.ClassLoader override)
Groovy Documentation