Groovy 1.7.10

## groovy.util
[Java] Class ProxyGenerator

    java.lang.Object
      groovy.util.ProxyGenerator

    public class ProxyGenerator
    extends Object

Classes to generate 'Proxy' objects which implement interfaces, maps of closures and/or extend classes/delegates.

Authors:
  Paul King
  Guillaume Laforge

Field Summary
`static ProxyGenerator` | `INSTANCE`

Method Summary
`boolean` | `getDebug()`
`boolean` | `getEmptyMethods()`
`ClassLoader` | `getOverride()`
`String` | `getSimpleName(Class c)` TODO once we switch to Java 1.5 bt default, use Class#getSimpleName() directly
`GroovyObject` | `instantiateAggregate(List interfaces)`
`GroovyObject` | `instantiateAggregate(Map closureMap, List interfaces)`
`GroovyObject` | `instantiateAggregate(Map closureMap, List interfaces, Class clazz)`
`GroovyObject` | `instantiateAggregate(Map closureMap, List interfaces, Class clazz, Object[] constructorArgs)`
`GroovyObject` | `instantiateAggregateFromBaseClass(Class clazz)`
`GroovyObject` | `instantiateAggregateFromBaseClass(Map map, Class clazz)`
`GroovyObject` | `instantiateAggregateFromBaseClass(Closure cl, Class clazz)`
`GroovyObject` | `instantiateAggregateFromBaseClass(Class clazz, Object[] constructorArgs)`
`GroovyObject` | `instantiateAggregateFromBaseClass(Map map, Class clazz, Object[] constructorArgs)`
`GroovyObject` | `instantiateAggregateFromInterface(Class clazz)`
`GroovyObject` | `instantiateAggregateFromInterface(Map map, Class clazz)`
`GroovyObject` | `instantiateDelegate(Object delegate)`
`GroovyObject` | `instantiateDelegate(List interfaces, Object delegate)`
`GroovyObject` | `instantiateDelegate(Map closureMap, List interfaces, Object delegate)`
`GroovyObject` | `instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate)`
`GroovyObject` | `instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate, Class baseClass)`
`GroovyObject` | `instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate, Class baseClass, String name)`
`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(ClassLoader override)`
`String` | `shortName(String name)`

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### INSTANCE

    public static final ProxyGenerator INSTANCE

Method Detail

### getDebug

    public boolean getDebug()

### getEmptyMethods

    public boolean getEmptyMethods()

### getOverride

    public ClassLoader getOverride()

### getSimpleName

    public String getSimpleName(Class c)

  TODO once we switch to Java 1.5 bt default, use Class#getSimpleName() directly
  Parameters:
    `c` - the class of which we want the readable simple name
  Returns:
    the readable simple name

### instantiateAggregate

    public GroovyObject instantiateAggregate(List interfaces)

### instantiateAggregate

    public GroovyObject instantiateAggregate(Map closureMap, List interfaces)

### instantiateAggregate

    public GroovyObject instantiateAggregate(Map closureMap, List interfaces, Class clazz)

### instantiateAggregate

    public GroovyObject instantiateAggregate(Map closureMap, List interfaces, Class clazz, Object[] constructorArgs)

### instantiateAggregateFromBaseClass

    public GroovyObject instantiateAggregateFromBaseClass(Class clazz)

### instantiateAggregateFromBaseClass

    public GroovyObject instantiateAggregateFromBaseClass(Map map, Class clazz)

### instantiateAggregateFromBaseClass

    public GroovyObject instantiateAggregateFromBaseClass(Closure cl, Class clazz)

### instantiateAggregateFromBaseClass

    public GroovyObject instantiateAggregateFromBaseClass(Class clazz, Object[] constructorArgs)

### instantiateAggregateFromBaseClass

    public GroovyObject instantiateAggregateFromBaseClass(Map map, Class clazz, Object[] constructorArgs)

### instantiateAggregateFromInterface

    public GroovyObject instantiateAggregateFromInterface(Class clazz)

### instantiateAggregateFromInterface

    public GroovyObject instantiateAggregateFromInterface(Map map, Class clazz)

### instantiateDelegate

    public GroovyObject instantiateDelegate(Object delegate)

### instantiateDelegate

    public GroovyObject instantiateDelegate(List interfaces, Object delegate)

### instantiateDelegate

    public GroovyObject instantiateDelegate(Map closureMap, List interfaces, Object delegate)

### instantiateDelegateWithBaseClass

    public GroovyObject instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate)

### instantiateDelegateWithBaseClass

    public GroovyObject instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate, Class baseClass)

### instantiateDelegateWithBaseClass

    public GroovyObject instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate, Class baseClass, String name)

### setDebug

    public void setDebug(boolean debug)

  Instructs `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.
  Parameters:
    `debug` - true if you want generated source to be printed

### setEmptyMethods

    public void setEmptyMethods(boolean emptyMethods)

  Changes generated methods to have empty implementations.

  Methods in generated aggregates not supplied in a closures map or base class are given 'default' implementations. The implementation will normally throw an `UnsupportedOperationException` but setting this boolean will leave it empty.
  Parameters:
    `emptyMethods` - true if you want generated methods to be empty

### setOverride

    public void setOverride(ClassLoader override)

### shortName

    public String shortName(String name)

Copyright © 2003-2010 The Codehaus. All rights reserved.